Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4807)

Unified Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 7399015: Sync Promo: Add a way to collapse the sync promo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Promo: Add a way to collapse the sync promo Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
-}
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698