| Index: chrome/browser/ui/webui/sync_setup_handler.cc
|
| ===================================================================
|
| --- chrome/browser/ui/webui/sync_setup_handler.cc (revision 93571)
|
| +++ chrome/browser/ui/webui/sync_setup_handler.cc (working copy)
|
| @@ -264,6 +264,8 @@
|
| { "encryptedDataTypesTitle", IDS_SYNC_ENCRYPTION_DATA_TYPES_TITLE },
|
| { "encryptSensitiveOption", IDS_SYNC_ENCRYPT_SENSITIVE_DATA },
|
| { "encryptAllOption", IDS_SYNC_ENCRYPT_ALL_DATA },
|
| + { "encryptAllOption", IDS_SYNC_ENCRYPT_ALL_DATA },
|
| + { "statusNotConnected", IDS_SYNC_STATUS_NOT_CONNECTED }
|
| };
|
|
|
| RegisterStrings(localized_strings, resources, arraysize(resources));
|
| @@ -338,10 +340,7 @@
|
| }
|
|
|
| void SyncSetupHandler::OnDidClosePage(const ListValue* args) {
|
| - if (flow_) {
|
| - flow_->OnDialogClosed(std::string());
|
| - flow_ = NULL;
|
| - }
|
| + CloseSyncSetup();
|
| }
|
|
|
| void SyncSetupHandler::HandleSubmitAuth(const ListValue* args) {
|
| @@ -416,6 +415,40 @@
|
| }
|
|
|
| void SyncSetupHandler::HandleAttachHandler(const ListValue* args) {
|
| + OpenSyncSetup();
|
| +}
|
| +
|
| +void SyncSetupHandler::HandleShowErrorUI(const ListValue* args) {
|
| + DCHECK(!flow_);
|
| +
|
| + ProfileSyncService* service =
|
| + web_ui_->GetProfile()->GetProfileSyncService();
|
| + DCHECK(service);
|
| +
|
| + service->get_wizard().Step(SyncSetupWizard::NONFATAL_ERROR);
|
| +
|
| + // Show the Sync Setup page.
|
| + if (service->get_wizard().IsVisible()) {
|
| + service->get_wizard().Focus();
|
| + } else {
|
| + StringValue page("syncSetup");
|
| + web_ui_->CallJavascriptFunction("OptionsPage.navigateToPage", page);
|
| + }
|
| +}
|
| +
|
| +void SyncSetupHandler::HandleShowSetupUI(const ListValue* args) {
|
| + DCHECK(!flow_);
|
| + ShowSetupUI();
|
| +}
|
| +
|
| +void SyncSetupHandler::CloseSyncSetup() {
|
| + if (flow_) {
|
| + flow_->OnDialogClosed(std::string());
|
| + flow_ = NULL;
|
| + }
|
| +}
|
| +
|
| +void SyncSetupHandler::OpenSyncSetup() {
|
| DCHECK(web_ui_);
|
| DCHECK(!flow_);
|
|
|
| @@ -440,26 +473,3 @@
|
| service->get_wizard().Focus();
|
| }
|
| }
|
| -
|
| -void SyncSetupHandler::HandleShowErrorUI(const ListValue* args) {
|
| - DCHECK(!flow_);
|
| -
|
| - ProfileSyncService* service =
|
| - web_ui_->GetProfile()->GetProfileSyncService();
|
| - DCHECK(service);
|
| -
|
| - service->get_wizard().Step(SyncSetupWizard::NONFATAL_ERROR);
|
| -
|
| - // Show the Sync Setup page.
|
| - if (service->get_wizard().IsVisible()) {
|
| - service->get_wizard().Focus();
|
| - } else {
|
| - StringValue page("syncSetup");
|
| - web_ui_->CallJavascriptFunction("OptionsPage.navigateToPage", page);
|
| - }
|
| -}
|
| -
|
| -void SyncSetupHandler::HandleShowSetupUI(const ListValue* args) {
|
| - DCHECK(!flow_);
|
| - ShowSetupUI();
|
| -}
|
|
|