Trigger NotifyPassphraseAccepted from the UI thread when a correct passphrase is entered
Trigger NotifyPassphraseAccepted from the UI thread when a correct passphrase is entered

As of today, when a user enters a passphrase for decryption while
signing in to sync, the passphrase is tested against the cached pending
keys, and then sent down to the syncer thread so that the cryptographer
can use it for decryption. At the end of decryption,
OnPassphraseAccepted is called.

The problem with this is that in the meantime, if the user brings up the
advanced settings dialog, we might unnecessarily prompt the user for a
passphrase even though the correct one was entered.

This patch adds a call to NotifyPassphraseAccepted in
SyncBackendHost::SetDecryptionPassphrase if the correct passphrase is
entered. This gives the UI immediate feedback when a passphrase is
accepted, and will pave the way for a snappier user experience.

BUG=119191
TEST=sync_unit_tests, sync_integration_tests, Enter a passphrase and immediately open the advanced setup dialog


Review URL: http://codereview.chromium.org/9794007

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@127895 0039d316-1c4b-4281-b951-d872f2087c98

ropik/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,adobe/chromium,adobe/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium