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

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

Issue 7324038: Sync Promo: Add "Setup Chrome Sync" menu item to the wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Promo: Add "Setup Chrome Sync" menu item to the wrench menu 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/browser.h ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
===================================================================
--- chrome/browser/ui/browser.cc (revision 92222)
+++ chrome/browser/ui/browser.cc (working copy)
@@ -2463,6 +2463,7 @@
case IDC_INTERNET_OPTIONS: OpenInternetOptionsDialog(); break;
case IDC_LANGUAGE_OPTIONS: OpenLanguageOptionsDialog(); break;
#endif
+ case IDC_SHOW_SYNC_SETUP: ShowSyncSetup(); break;
default:
LOG(WARNING) << "Received Unimplemented Command: " << id;
@@ -3862,6 +3863,7 @@
command_updater_.UpdateCommandEnabled(IDC_SYSTEM_OPTIONS, true);
command_updater_.UpdateCommandEnabled(IDC_INTERNET_OPTIONS, true);
#endif
+ command_updater_.UpdateCommandEnabled(IDC_SHOW_SYNC_SETUP, true);
ExtensionService* extension_service = profile()->GetExtensionService();
bool enable_extensions =
@@ -4754,3 +4756,11 @@
BookmarkBar::DONT_ANIMATE_STATE_CHANGE;
window_->BookmarkBarStateChanged(animate_type);
}
+
+void Browser::ShowSyncSetup() {
+ ProfileSyncService* service = profile()->GetProfileSyncService();
+ if (service->HasSyncSetupCompleted())
+ ShowOptionsTab(chrome::kSyncSetupSubPage);
+ else
+ profile()->GetProfileSyncService()->ShowLoginDialog();
+}
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698