Index: chrome/browser/sync/profile_sync_service.cc |
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc |
index aa95e2aed73e0059e01afed2d9cbe79c48b0195e..937af9f460aedd92aba3c7be69a3871fc4e8a763 100644 |
--- a/chrome/browser/sync/profile_sync_service.cc |
+++ b/chrome/browser/sync/profile_sync_service.cc |
@@ -598,6 +598,13 @@ void ProfileSyncService::OnClearServerDataSucceeded() { |
void ProfileSyncService::OnPassphraseRequired(bool for_decryption) { |
DCHECK(backend_.get()); |
DCHECK(backend_->IsNigoriEnabled()); |
+ |
+ // TODO(lipalani) : add this check to other locations as well. |
+ if (unrecoverable_error_detected_) { |
+ // When unrecoverable error is detected we post a task to shutdown the |
+ // backend. The task might not have executed yet. |
+ return; |
+ } |
observed_passphrase_required_ = true; |
passphrase_required_for_decryption_ = for_decryption; |