| Index: chrome/browser/sync/glue/sync_backend_host.cc
|
| diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
|
| index 6e143a3f777b365bf51f93733091fee8335a1d8c..c424b8a7414aaddbc8fbe182cacb5806b3524cf6 100644
|
| --- a/chrome/browser/sync/glue/sync_backend_host.cc
|
| +++ b/chrome/browser/sync/glue/sync_backend_host.cc
|
| @@ -528,7 +528,8 @@ bool SyncBackendHost::RequestClearServerData() {
|
| SyncBackendHost::Core::~Core() {
|
| }
|
|
|
| -void SyncBackendHost::Core::NotifyPassphraseRequired(bool for_decryption) {
|
| +void SyncBackendHost::Core::NotifyPassphraseRequired(
|
| + sync_api::PassphraseRequiredReason reason) {
|
| if (!host_ || !host_->frontend_)
|
| return;
|
|
|
| @@ -539,19 +540,12 @@ void SyncBackendHost::Core::NotifyPassphraseRequired(bool for_decryption) {
|
| << "passphrase. Silently dropping.";
|
| return;
|
| }
|
| - host_->frontend_->OnPassphraseRequired(for_decryption);
|
| -}
|
|
|
| -void SyncBackendHost::Core::NotifyPassphraseFailed() {
|
| - if (!host_ || !host_->frontend_)
|
| - return;
|
| -
|
| - DCHECK_EQ(MessageLoop::current(), host_->frontend_loop_);
|
| + // When a passphrase fails, unset our waiting flag.
|
| + if (reason == sync_api::DECRYPTION_FAILED)
|
| + processing_passphrase_ = false;
|
|
|
| - // When a passphrase fails, we just unset our waiting flag and trigger a
|
| - // OnPassphraseRequired(true).
|
| - processing_passphrase_ = false;
|
| - host_->frontend_->OnPassphraseRequired(true);
|
| + host_->frontend_->OnPassphraseRequired(reason);
|
| }
|
|
|
| void SyncBackendHost::Core::NotifyPassphraseAccepted(
|
| @@ -972,14 +966,10 @@ void SyncBackendHost::Core::OnAuthError(const AuthError& auth_error) {
|
| auth_error));
|
| }
|
|
|
| -void SyncBackendHost::Core::OnPassphraseRequired(bool for_decryption) {
|
| - host_->frontend_loop_->PostTask(FROM_HERE,
|
| - NewRunnableMethod(this, &Core::NotifyPassphraseRequired, for_decryption));
|
| -}
|
| -
|
| -void SyncBackendHost::Core::OnPassphraseFailed() {
|
| +void SyncBackendHost::Core::OnPassphraseRequired(
|
| + sync_api::PassphraseRequiredReason reason) {
|
| host_->frontend_loop_->PostTask(FROM_HERE,
|
| - NewRunnableMethod(this, &Core::NotifyPassphraseFailed));
|
| + NewRunnableMethod(this, &Core::NotifyPassphraseRequired, reason));
|
| }
|
|
|
| void SyncBackendHost::Core::OnPassphraseAccepted(
|
|
|