diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-09 20:28:52 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-09 20:28:52 +0000 |
commit | 5c0ec92f84301a970f5df4872c3dbf9147eb5581 (patch) | |
tree | ea3ab37a515ef9cea97f2d54543714e625a1c375 /chrome | |
parent | f7e19a26dd49ec788b31d2fa3451f3d43f7f6b42 (diff) | |
download | chromium_src-5c0ec92f84301a970f5df4872c3dbf9147eb5581.zip chromium_src-5c0ec92f84301a970f5df4872c3dbf9147eb5581.tar.gz chromium_src-5c0ec92f84301a970f5df4872c3dbf9147eb5581.tar.bz2 |
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
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/generated_resources.grd | 12 | ||||
-rw-r--r-- | chrome/browser/browser_resources.grd | 1 | ||||
-rw-r--r-- | chrome/browser/sync/engine/syncapi.cc | 2 | ||||
-rw-r--r-- | chrome/browser/sync/profile_sync_service.cc | 19 | ||||
-rw-r--r-- | chrome/browser/sync/profile_sync_service.h | 4 | ||||
-rw-r--r-- | chrome/browser/sync/resources/firstpassphrase.html | 151 | ||||
-rw-r--r-- | chrome/browser/sync/resources/setup_flow.html | 6 | ||||
-rw-r--r-- | chrome/browser/sync/sync_setup_flow.cc | 18 | ||||
-rw-r--r-- | chrome/browser/sync/sync_setup_flow.h | 7 | ||||
-rw-r--r-- | chrome/browser/sync/sync_setup_flow_handler.h | 1 | ||||
-rw-r--r-- | chrome/browser/sync/sync_setup_wizard.cc | 3 | ||||
-rw-r--r-- | chrome/browser/sync/sync_setup_wizard.h | 3 | ||||
-rw-r--r-- | chrome/browser/sync/sync_setup_wizard_unittest.cc | 18 | ||||
-rw-r--r-- | chrome/browser/ui/webui/options/sync_setup_handler.cc | 43 | ||||
-rw-r--r-- | chrome/browser/ui/webui/options/sync_setup_handler.h | 2 |
15 files changed, 8 insertions, 282 deletions
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 <message name="IDS_SYNC_LOGIN_FOR_ENCRYPTION" desc="Explanation of login for the purpose of encryption."> <ph name="PRODUCT_NAME">$1<ex>Chrome</ex></ph> can now sync your passwords. To protect your data, you need to confirm your account information. </message> - <message name="IDS_SYNC_FIRST_PASSPHRASE_TITLE" desc="Title for dialog setting up first passphrase."> - Sync your passwords - </message> <message name="IDS_SYNC_PASSPHRASE_ENCRYPTION_MESSAGE" desc="Message explaining that passwords are encrypted."> For added security, <ph name="PRODUCT_NAME">$1<ex>Chrome</ex></ph> will encrypt your passwords. </message> - <message name="IDS_SYNC_FIRST_PASSPHRASE_MESSAGE" desc="Message for setting up first passphrase."> - <ph name="PRODUCT_NAME">$1<ex>Chrome</ex></ph> can now sync your passwords; your data will be encrypted with your Google Account password or a passphrase of your choosing. - </message> - <message name="IDS_SYNC_FIRST_PASSPHRASE_OK" desc="Message to confirm the passphrase setup."> - Sync passwords - </message> - <message name="IDS_SYNC_FIRST_PASSPHRASE_CANCEL" desc="Message to opt out of the passphrase setup and password sync"> - No thanks - </message> <message name="IDS_SYNC_PASSPHRASE_OPT_GOOGLE" desc="Radio button label for using Google password."> Use my Google Account password </message> 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 @@ <include name="IDR_SSL_ROAD_BLOCK_HTML" file="resources\ssl_roadblock.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_SYNC_CONFIGURE_HTML" file="sync\resources\configure.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_SYNC_PASSPHRASE_HTML" file="sync\resources\passphrase.html" flattenhtml="true" type="BINDATA" /> - <include name="IDR_SYNC_FIRST_PASSPHRASE_HTML" file="sync\resources\firstpassphrase.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_SYNC_SETTING_UP_HTML" file="sync\resources\setting_up.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_SYNC_SETUP_DONE_HTML" file="sync\resources\setup_done.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_SYNC_SETUP_FLOW_HTML" file="sync\resources\setup_flow.html" flattenhtml="true" type="BINDATA" /> 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 @@ -<html i18n-values="dir:textdirection;"> -<head> -<title></title> -<style type="text/css"> -body { - line-height: 1.5em; - background: #FFFFFF; - font-size: 11pt; -} -html[os='mac'] body { - line-height: 1.5em; - background: #FFFFFF; -} -form { - -webkit-user-select: none; -} -.error { - color: red; - font-size: 10pt; - } -.sync-header { - font-size: 1.2em; - font-weight: bold; - margin-bottom: 10px; -} -.sync-instructions { - margin-top: 10px; - margin-bottom: 10px; -} -.sync-footer { - position: fixed; - right: 0px; - bottom: 0px; - margin-right: 10px; - margin-bottom: 10px; -} -.sync-section { - background: #EEE; - margin: 5px; - padding: 10px; -} - -#learn-more-link { - float: right; -} -html[dir='rtl'] #learn-more-link { - float: left; -} -html[dir='rtl'] .sync-footer { - text-align: left; - left: 0px; - bottom: 0px; - margin-left: 20px; -} -input[type='button'], -input[type='submit'] { - min-width: 87px; - min-height: 26px; - margin-left: 7px; -} -html[os='mac'] input[type='button'], -html[os='mac'] input[type='submit'] { - font-size: 12pt; -} - -#passphrase { - margin-top: 5px; -} - -</style> -<script src="chrome://resources/js/cr.js"></script> -<script> - var currentMode; - - // Called once, when this html/js is loaded. - function setupDialog(args) { - // Allow platform specific rules - if (cr.isMac) { - document.documentElement.setAttribute('os', 'mac'); - } else if (!cr.isWindows) { - document.documentElement.setAttribute('os', 'linux'); - } - - switchToMode(""); - } - - function switchToMode(mode) { - document.getElementById("section-explicit").style.display = "none"; - - if (mode == "explicit") { - document.getElementById("section-explicit").style.display = "block"; - } - } - - function getRadioCheckedValue() { - var f = document.getElementById("form"); - for (var i = 0; i < f.option.length; ++i) { - if (f.option[i].checked) { - return f.option[i].value; - } - } - return undefined; - } - - function onRadioChange() { - switchToMode(getRadioCheckedValue()); - } - - function checkPassphraseMatch() { - var emptyError = document.getElementById("emptyerror"); - var mismatchError = document.getElementById("mismatcherror"); - emptyError.style.display = "none"; - mismatchError.style.display = "none"; - - if (getRadioCheckedValue() != "explicit") { - return true; - } - var f = document.getElementById("form"); - if (f.passphrase.value.length == 0) { - emptyError.style.display = "block"; - return false; - } - if (f.confirmpassphrase.value != f.passphrase.value) { - mismatchError.style.display = "block"; - return false; - } - return true; - } - - function sendValuesAndClose() { - var f = document.getElementById("form"); - if (!checkPassphraseMatch()) { - return false; - } - - var result = JSON.stringify({"option": getRadioCheckedValue(), - "passphrase": f.passphrase.value}); - chrome.send("FirstPassphrase", [result]); - } - - function optOutOfPasswordsAndClose() { - var result = JSON.stringify({"option": "nothanks", - "passphrase": ""}); - chrome.send("FirstPassphrase", [result]); - } -</script> -</head> -<body i18n-values=".style.fontFamily:fontfamily" onload="setupDialog();"> - -</body> -</html> 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 @@ <script type="text/javascript"> function hideAllPages() { var pages = ['login', 'configure', 'passphrase', - 'settingup', 'done', 'firstpassphrase']; + 'settingup', 'done']; for (var i = 0; i < pages.length; ++i) { document.getElementById(pages[i]).style.display = 'none'; document.getElementById(pages[i]).tabIndex = -1; @@ -22,7 +22,6 @@ function showPassphrase() { showPage('passphrase'); } function showSettingUp() { showPage('settingup'); } function showSetupDone() { showPage('done'); } - function showFirstPassphrase() { showPage('firstpassphrase'); } // Called once, when this html/js is loaded. function showTheRightIframe() { @@ -47,8 +46,5 @@ <iframe id="done" frameborder="0" width="100%" scrolling="no" height="100%" src="chrome://syncresources/setupdone" style="display:none" tabindex="-1"></iframe> - <iframe id="firstpassphrase" frameborder="0" width="100%" scrolling="no" - height="100%" src="chrome://syncresources/firstpassphrase" - style="display:none" tabindex="-1"></iframe> </body> </html> diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc index 837d74d..88368be 100644 --- a/chrome/browser/sync/sync_setup_flow.cc +++ b/chrome/browser/sync/sync_setup_flow.cc @@ -64,8 +64,6 @@ SyncSetupFlow* SyncSetupFlow::Run(ProfileSyncService* service, SyncSetupFlow::GetArgsForConfigure(service, &args); else if (start == SyncSetupWizard::ENTER_PASSPHRASE) SyncSetupFlow::GetArgsForEnterPassphrase(false, false, &args); - else if (start == SyncSetupWizard::PASSPHRASE_MIGRATION) - args.SetString("iframeToShow", "firstpassphrase"); std::string json_args; base::JSONWriter::Write(&args, false, &json_args); @@ -259,12 +257,6 @@ void SyncSetupFlow::OnPassphraseCancel() { Advance(SyncSetupWizard::SETTING_UP); } -// TODO(jhawkins): Remove this method. -void SyncSetupFlow::OnFirstPassphraseEntry(const std::string& option, - const std::string& passphrase) { - NOTREACHED(); -} - // TODO(jhawkins): Use this method instead of a direct link in the html. void SyncSetupFlow::OnGoToDashboard() { BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); @@ -303,8 +295,6 @@ bool SyncSetupFlow::ShouldAdvance(SyncSetupWizard::State state) { return current_state_ == SyncSetupWizard::SYNC_EVERYTHING || current_state_ == SyncSetupWizard::CONFIGURE || current_state_ == SyncSetupWizard::SETTING_UP; - case SyncSetupWizard::PASSPHRASE_MIGRATION: - return current_state_ == SyncSetupWizard::GAIA_LOGIN; case SyncSetupWizard::SETUP_ABORTED_BY_PENDING_CLEAR: DCHECK(current_state_ != SyncSetupWizard::GAIA_LOGIN && current_state_ != SyncSetupWizard::GAIA_SUCCESS); @@ -312,8 +302,7 @@ bool SyncSetupFlow::ShouldAdvance(SyncSetupWizard::State state) { case SyncSetupWizard::SETTING_UP: return current_state_ == SyncSetupWizard::SYNC_EVERYTHING || current_state_ == SyncSetupWizard::CONFIGURE || - current_state_ == SyncSetupWizard::ENTER_PASSPHRASE || - current_state_ == SyncSetupWizard::PASSPHRASE_MIGRATION; + current_state_ == SyncSetupWizard::ENTER_PASSPHRASE; case SyncSetupWizard::FATAL_ERROR: return true; // You can always hit the panic button. case SyncSetupWizard::DONE: @@ -362,11 +351,6 @@ void SyncSetupFlow::ActivateState(SyncSetupWizard::State state) { flow_handler_->ShowPassphraseEntry(args); break; } - case SyncSetupWizard::PASSPHRASE_MIGRATION: { - DictionaryValue args; - flow_handler_->ShowFirstPassphrase(args); - break; - } case SyncSetupWizard::SETUP_ABORTED_BY_PENDING_CLEAR: { DictionaryValue args; SyncSetupFlow::GetArgsForConfigure(service_, &args); diff --git a/chrome/browser/sync/sync_setup_flow.h b/chrome/browser/sync/sync_setup_flow.h index 377df17..6531387 100644 --- a/chrome/browser/sync/sync_setup_flow.h +++ b/chrome/browser/sync/sync_setup_flow.h @@ -89,12 +89,6 @@ class SyncSetupFlow { // The user canceled the passphrase entry without supplying a passphrase. void OnPassphraseCancel(); - // The 'first passphrase' screen is for users migrating from a build - // without passwords, who are prompted to make a passphrase choice. - // TODO(jhawkins): This is no longer used; remove this method. - void OnFirstPassphraseEntry(const std::string& option, - const std::string& passphrase); - void OnGoToDashboard(); void OnDialogClosed(const std::string& json_retval); @@ -111,7 +105,6 @@ class SyncSetupFlow { FRIEND_TEST_ALL_PREFIXES(SyncSetupWizardTest, DiscreteRunChooseDataTypesAbortedByPendingClear); FRIEND_TEST_ALL_PREFIXES(SyncSetupWizardTest, EnterPassphraseRequired); - FRIEND_TEST_ALL_PREFIXES(SyncSetupWizardTest, PassphraseMigration); // Use static Run method to get an instance. SyncSetupFlow(SyncSetupWizard::State start_state, diff --git a/chrome/browser/sync/sync_setup_flow_handler.h b/chrome/browser/sync/sync_setup_flow_handler.h index 2c1d30a..4d95ccb 100644 --- a/chrome/browser/sync/sync_setup_flow_handler.h +++ b/chrome/browser/sync/sync_setup_flow_handler.h @@ -21,7 +21,6 @@ class SyncSetupFlowHandler { virtual void ShowGaiaSuccessAndSettingUp() = 0; virtual void ShowConfigure(const DictionaryValue& args) = 0; virtual void ShowPassphraseEntry(const DictionaryValue& args) = 0; - virtual void ShowFirstPassphrase(const DictionaryValue& args) = 0; virtual void ShowSettingUp() = 0; virtual void ShowSetupDone(const std::wstring& user) = 0; diff --git a/chrome/browser/sync/sync_setup_wizard.cc b/chrome/browser/sync/sync_setup_wizard.cc index d266976..0faab72 100644 --- a/chrome/browser/sync/sync_setup_wizard.cc +++ b/chrome/browser/sync/sync_setup_wizard.cc @@ -78,8 +78,7 @@ SyncSetupWizard::State SyncSetupWizard::GetEndStateForDiscreteRun( result = GAIA_SUCCESS; } else if (start_state == ENTER_PASSPHRASE || start_state == SYNC_EVERYTHING || - start_state == CONFIGURE || - start_state == PASSPHRASE_MIGRATION) { + start_state == CONFIGURE) { result = DONE; } DCHECK_NE(FATAL_ERROR, result) << diff --git a/chrome/browser/sync/sync_setup_wizard.h b/chrome/browser/sync/sync_setup_wizard.h index c51d2ab..1305bed 100644 --- a/chrome/browser/sync/sync_setup_wizard.h +++ b/chrome/browser/sync/sync_setup_wizard.h @@ -34,9 +34,6 @@ class SyncSetupWizard { CONFIGURE, // Show the screen that prompts for your passphrase ENTER_PASSPHRASE, - // Show the passphrase "first time" screen for migrating users, where all - // is explained and they choose between google password/custom passphrase. - PASSPHRASE_MIGRATION, // The panic switch. Something went terribly wrong during setup and we // can't recover. FATAL_ERROR, diff --git a/chrome/browser/sync/sync_setup_wizard_unittest.cc b/chrome/browser/sync/sync_setup_wizard_unittest.cc index 073ca89..6b646f0 100644 --- a/chrome/browser/sync/sync_setup_wizard_unittest.cc +++ b/chrome/browser/sync/sync_setup_wizard_unittest.cc @@ -351,24 +351,6 @@ TEST_F(SyncSetupWizardTest, DISABLED_EnterPassphraseRequired) { #endif } -TEST_F(SyncSetupWizardTest, DISABLED_PassphraseMigration) { - SKIP_TEST_ON_MACOSX(); - wizard_->Step(SyncSetupWizard::PASSPHRASE_MIGRATION); -#if 0 - ListValue value; - value.Append(new StringValue("{\"option\":\"explicit\"," - "\"passphrase\":\"myPassphrase\"}")); - test_window_->flow()->flow_handler_->HandleFirstPassphrase(&value); - EXPECT_EQ("myPassphrase", service_->passphrase_); - - ListValue value2; - value2.Append(new StringValue("{\"option\":\"nothanks\"," - "\"passphrase\":\"myPassphrase\"}")); - test_window_->flow()->flow_handler_->HandleFirstPassphrase(&value2); - EXPECT_EQ(service_->chosen_data_types_.count(syncable::PASSWORDS), 0U); -#endif -} - TEST_F(SyncSetupWizardTest, DISABLED_DialogCancelled) { SKIP_TEST_ON_MACOSX(); wizard_->Step(SyncSetupWizard::GAIA_LOGIN); diff --git a/chrome/browser/ui/webui/options/sync_setup_handler.cc b/chrome/browser/ui/webui/options/sync_setup_handler.cc index a55e66e..19a294a 100644 --- a/chrome/browser/ui/webui/options/sync_setup_handler.cc +++ b/chrome/browser/ui/webui/options/sync_setup_handler.cc @@ -139,18 +139,6 @@ bool GetPassphrase(const std::string& json, std::string* passphrase) { return result->GetString("passphrase", passphrase); } -bool GetFirstPassphrase(const std::string& json, - std::string* option, - std::string* passphrase) { - scoped_ptr<Value> parsed_value(base::JSONReader::Read(json, false)); - if (!parsed_value.get() || !parsed_value->IsType(Value::TYPE_DICTIONARY)) - return false; - - DictionaryValue* result = static_cast<DictionaryValue*>(parsed_value.get()); - return result->GetString("option", option) && - result->GetString("passphrase", passphrase); -} - } // namespace SyncSetupHandler::SyncSetupHandler() : flow_(NULL) { @@ -238,8 +226,6 @@ void SyncSetupHandler::GetLocalizedValues(DictionaryValue* localized_strings) { { "mismatchErrorMessage", IDS_SYNC_PASSPHRASE_MISMATCH_ERROR }, { "passphraseWarning", IDS_SYNC_PASSPHRASE_WARNING }, { "clearDataLink", IDS_SYNC_CLEAR_DATA_LINK }, - { "enterPassphraseTitle", IDS_SYNC_ENTER_PASSPHRASE_TITLE }, - { "firstPassphraseTitle", IDS_SYNC_FIRST_PASSPHRASE_TITLE }, { "customizeLinkLabel", IDS_SYNC_CUSTOMIZE_LINK_LABEL }, { "confirmSyncPreferences", IDS_SYNC_CONFIRM_SYNC_PREFERENCES }, { "syncEverything", IDS_SYNC_SYNC_EVERYTHING }, @@ -281,8 +267,6 @@ void SyncSetupHandler::RegisterMessages() { NewCallback(this, &SyncSetupHandler::HandlePassphraseEntry)); web_ui_->RegisterMessageCallback("PassphraseCancel", NewCallback(this, &SyncSetupHandler::HandlePassphraseCancel)); - web_ui_->RegisterMessageCallback("FirstPassphrase", - NewCallback(this, &SyncSetupHandler::HandleFirstPassphrase)); } void SyncSetupHandler::ShowGaiaLogin(const DictionaryValue& args) { @@ -311,12 +295,6 @@ void SyncSetupHandler::ShowPassphraseEntry(const DictionaryValue& args) { "SyncSetupOverlay.showSyncSetupPage", page, args); } -void SyncSetupHandler::ShowFirstPassphrase(const DictionaryValue& args) { - // TODO(jhawkins): Remove this logic in SyncSetupFlow. It will never be - // reached. - NOTREACHED(); -} - void SyncSetupHandler::ShowSettingUp() { StringValue page("settingUp"); web_ui_->CallJavascriptFunction( @@ -419,24 +397,3 @@ void SyncSetupHandler::HandlePassphraseCancel(const ListValue* args) { DCHECK(flow_); flow_->OnPassphraseCancel(); } - -void SyncSetupHandler::HandleFirstPassphrase(const ListValue* args) { - std::string json; - if (!args->GetString(0, &json)) { - NOTREACHED() << "Could not read JSON argument"; - return; - } - if (json.empty()) - return; - - std::string option; - std::string passphrase; - if (!GetFirstPassphrase(json, &option, &passphrase)) { - // Page sent result which couldn't be parsed. Programming error. - NOTREACHED(); - return; - } - - DCHECK(flow_); - flow_->OnFirstPassphraseEntry(option, passphrase); -} diff --git a/chrome/browser/ui/webui/options/sync_setup_handler.h b/chrome/browser/ui/webui/options/sync_setup_handler.h index d026a81..f259163 100644 --- a/chrome/browser/ui/webui/options/sync_setup_handler.h +++ b/chrome/browser/ui/webui/options/sync_setup_handler.h @@ -27,7 +27,6 @@ class SyncSetupHandler : public OptionsPageUIHandler, virtual void ShowGaiaSuccessAndSettingUp(); virtual void ShowConfigure(const DictionaryValue& args); virtual void ShowPassphraseEntry(const DictionaryValue& args); - virtual void ShowFirstPassphrase(const DictionaryValue& args); virtual void ShowSettingUp(); virtual void ShowSetupDone(const std::wstring& user); @@ -41,7 +40,6 @@ class SyncSetupHandler : public OptionsPageUIHandler, void HandleConfigure(const ListValue* args); void HandlePassphraseEntry(const ListValue* args); void HandlePassphraseCancel(const ListValue* args); - void HandleFirstPassphrase(const ListValue* args); // Weak reference. SyncSetupFlow* flow_; |