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

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: Address review comments 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..98902d8b6ab1cf9b697c0efd1056f3491f60ca85 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,19 @@ 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);
+ string16 short_product_name =
+ l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME);
+ if (username.empty()) {
+ return l10n_util::GetStringFUTF16(IDS_SHOW_SYNC_SETUP,
+ short_product_name);
+ }
+ 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