Index: chrome/browser/sync/sync_setup_flow.cc |
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc |
index a08bab1cd07ebe150914d5311b827970d0cb88bb..2cd8aa203c9fd7c2564e74e5aa03a9561add6db7 100644 |
--- a/chrome/browser/sync/sync_setup_flow.cc |
+++ b/chrome/browser/sync/sync_setup_flow.cc |
@@ -438,6 +438,15 @@ void SyncSetupFlow::ActivateState(SyncSetupWizard::State state) { |
} |
case SyncSetupWizard::GAIA_SUCCESS: |
if (end_state_ == SyncSetupWizard::GAIA_SUCCESS) { |
+ // The user has just re-authed - set the passphrase so we can re-encrypt |
+ // if necessary. If we are currently encrypting with an explicit |
+ // passphrase, this does nothing. |
+ // TODO(atwilson): Move all the code dealing with the implicit GAIA |
+ // passphrase back into ProfileSyncService in a |
+ // NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL listener once we get rid of |
+ // SyncSetupFlow. |
+ if (!cached_passphrase_.empty()) |
+ service_->SetPassphrase(cached_passphrase_, false); |
flow_handler_->ShowGaiaSuccessAndClose(); |
break; |
} |