From 5c0ec92f84301a970f5df4872c3dbf9147eb5581 Mon Sep 17 00:00:00 2001 From: "jhawkins@chromium.org" Date: Mon, 9 May 2011 20:28:52 +0000 Subject: Sync: Remove the now-unused PASSPHRASE_MIGRATION state of SyncSetupWizard. BUG=none TEST=none R=zea@chromium.org,tim@chromium.org Review URL: http://codereview.chromium.org/6932058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84667 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/generated_resources.grd | 12 -- chrome/browser/browser_resources.grd | 1 - chrome/browser/sync/engine/syncapi.cc | 2 + chrome/browser/sync/profile_sync_service.cc | 19 +-- chrome/browser/sync/profile_sync_service.h | 4 - chrome/browser/sync/resources/firstpassphrase.html | 151 --------------------- chrome/browser/sync/resources/setup_flow.html | 6 +- chrome/browser/sync/sync_setup_flow.cc | 18 +-- chrome/browser/sync/sync_setup_flow.h | 7 - chrome/browser/sync/sync_setup_flow_handler.h | 1 - chrome/browser/sync/sync_setup_wizard.cc | 3 +- chrome/browser/sync/sync_setup_wizard.h | 3 - chrome/browser/sync/sync_setup_wizard_unittest.cc | 18 --- .../browser/ui/webui/options/sync_setup_handler.cc | 43 ------ .../browser/ui/webui/options/sync_setup_handler.h | 2 - 15 files changed, 8 insertions(+), 282 deletions(-) delete mode 100644 chrome/browser/sync/resources/firstpassphrase.html (limited to 'chrome') diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 261206c..e829e57 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -8713,21 +8713,9 @@ Keep your key file in a safe place. You will need it to create new versions of y $1Chrome can now sync your passwords. To protect your data, you need to confirm your account information. - - Sync your passwords - For added security, $1Chrome will encrypt your passwords. - - $1Chrome can now sync your passwords; your data will be encrypted with your Google Account password or a passphrase of your choosing. - - - Sync passwords - - - No thanks - Use my Google Account password diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index ecafe8e..a9cacac 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd @@ -70,7 +70,6 @@ - diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index 1efdb26..44e7024 100644 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -1989,6 +1989,8 @@ void SyncManager::SyncInternal::SetPassphrase( // TODO(tim): If this is the first time the user has entered a passphrase // since the protocol changed to store passphrase preferences in the cloud, // make sure we update this preference. See bug 62103. + // TODO(jhawkins): Verify that this logic may be removed now that the + // migration is no longer supported. if (is_explicit) SetUsingExplicitPassphrasePrefForMigration(&trans); diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index 798d305..932d4cf 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -69,7 +69,6 @@ ProfileSyncService::ProfileSyncService(ProfileSyncFactory* factory, const std::string& cros_user) : last_auth_error_(AuthError::None()), passphrase_required_reason_(sync_api::REASON_PASSPHRASE_NOT_REQUIRED), - passphrase_migration_in_progress_(false), factory_(factory), profile_(profile), cros_user_(cros_user), @@ -720,9 +719,11 @@ void ProfileSyncService::ShowErrorUI() { if (IsUsingSecondaryPassphrase()) PromptForExistingPassphrase(); else - SigninForPassphraseMigration(); + NOTREACHED(); // Migration no longer supported. + return; } + const GoogleServiceAuthError& error = GetAuthError(); if (error.state() == GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS || error.state() == GoogleServiceAuthError::CAPTCHA_REQUIRED || @@ -755,11 +756,6 @@ void ProfileSyncService::PromptForExistingPassphrase() { wizard_.Step(SyncSetupWizard::ENTER_PASSPHRASE); } -void ProfileSyncService::SigninForPassphraseMigration() { - passphrase_migration_in_progress_ = true; - ShowLoginDialog(); -} - SyncBackendHost::StatusSummary ProfileSyncService::QuerySyncStatusSummary() { if (backend_.get() && backend_initialized_) return backend_->GetStatusSummary(); @@ -1245,15 +1241,6 @@ void ProfileSyncService::Observe(NotificationType type, // becomes a no-op. tried_implicit_gaia_remove_when_bug_62103_fixed_ = true; SetPassphrase(successful->password, false, true); - - // If this signin was to initiate a passphrase migration (on the - // first computer, thus not for decryption), continue the migration. - if (passphrase_migration_in_progress_ && - !IsPassphraseRequiredForDecryption()) { - wizard_.Step(SyncSetupWizard::PASSPHRASE_MIGRATION); - passphrase_migration_in_progress_ = false; - } - break; } case NotificationType::GOOGLE_SIGNIN_FAILED: { diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h index 490d050..7c3b34f 100644 --- a/chrome/browser/sync/profile_sync_service.h +++ b/chrome/browser/sync/profile_sync_service.h @@ -253,7 +253,6 @@ class ProfileSyncService : public browser_sync::SyncFrontend, void ShowConfigure(bool sync_everything); void PromptForExistingPassphrase(); - void SigninForPassphraseMigration(); // Pretty-printed strings for a given StatusSummary. static std::string BuildSyncStatusSummaryText( @@ -525,9 +524,6 @@ class ProfileSyncService : public browser_sync::SyncFrontend, // because a new passphrase is required? sync_api::PassphraseRequiredReason passphrase_required_reason_; - // Is the user in a passphrase migration? - bool passphrase_migration_in_progress_; - private: friend class ProfileSyncServicePasswordTest; friend class TestProfileSyncService; diff --git a/chrome/browser/sync/resources/firstpassphrase.html b/chrome/browser/sync/resources/firstpassphrase.html deleted file mode 100644 index adb8b42..0000000 --- a/chrome/browser/sync/resources/firstpassphrase.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - diff --git a/chrome/browser/sync/resources/setup_flow.html b/chrome/browser/sync/resources/setup_flow.html index 495828f..d37f436 100644 --- a/chrome/browser/sync/resources/setup_flow.html +++ b/chrome/browser/sync/resources/setup_flow.html @@ -4,7 +4,7 @@