[Sync] Fix a race condition crash in the Android sync settings.
commit15ad2e9bd2881a9580cdbc878b85b2029b93a44a
authormaxbogue <maxbogue@chromium.org>
Mon, 13 Jul 2015 18:01:07 +0000 (13 11:01 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 13 Jul 2015 18:01:51 +0000 (13 18:01 +0000)
treef83c5d0d5d76a382a0184f6d271fbfb1a2fe9bbc
parent235756a1838442176d70af5901ae502a582ff082
[Sync] Fix a race condition crash in the Android sync settings.

A tester was able to open the passphrase type dialog and turn off sync
at the same time, resulting in a crash. I was unable to manually
reproduce the crash, but reproduced it with a regression test
that now passes.

BUG=507557

Review URL: https://codereview.chromium.org/1223103002

Cr-Commit-Position: refs/heads/master@{#338530}
chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java