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

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

Issue 7604017: Sync Promo: Update sign into sync Wrench menu item (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/wrench_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 59e9787f8d8ea7c6fda279d03ad1e6ca21d470b0..5943311676a3ca2d43553c80cb2d73eb34c27197 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -245,7 +245,8 @@ bool WrenchMenuModel::IsItemForCommandIdDynamic(int command_id) const {
#endif
command_id == IDC_SYNC_BOOKMARKS ||
command_id == IDC_VIEW_BACKGROUND_PAGES ||
- command_id == IDC_UPGRADE_DIALOG;
+ command_id == IDC_UPGRADE_DIALOG ||
+ command_id == IDC_SHOW_SYNC_SETUP;
}
string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const {
@@ -279,6 +280,20 @@ string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const {
return l10n_util::GetStringFUTF16(IDS_UPDATE_NOW, product_name);
}
+ case IDC_SHOW_SYNC_SETUP: {
+ std::string username = browser_->GetProfile()->GetPrefs()->GetString(
+ prefs::kGoogleServicesUsername);
+ const string16 short_product_name =
Peter Kasting 2011/08/10 00:38:43 Nit: Why use const on one string but not the other
sail 2011/08/10 00:55:33 Done. Removed the const.
+ l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME);
+ if (username.empty()) {
+ return l10n_util::GetStringFUTF16(IDS_SHOW_SYNC_SETUP,
+ short_product_name);
+ } else {
Peter Kasting 2011/08/10 00:38:43 Nit: No else after return.
sail 2011/08/10 00:55:33 Done.
+ return l10n_util::GetStringFUTF16(IDS_SHOW_SYNC_SETUP_USERNAME,
+ short_product_name,
+ UTF8ToUTF16(username));
+ }
+ }
default:
NOTREACHED();
return string16();
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698