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

Unified Diff: chrome/browser/views/toolbar_view.cc

Issue 270081: Facelifts to sync UI (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/views/sync/sync_setup_wizard_unittest.cc ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/toolbar_view.cc
===================================================================
--- chrome/browser/views/toolbar_view.cc (revision 29168)
+++ chrome/browser/views/toolbar_view.cc (working copy)
@@ -20,14 +20,15 @@
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/browser_theme_provider.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/character_encoding.h"
#include "chrome/browser/encoding_menu_controller.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/sync/sync_status_ui_helper.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
-#include "chrome/browser/browser_theme_provider.h"
#include "chrome/browser/user_data_manager.h"
#include "chrome/browser/views/bookmark_menu_button.h"
#include "chrome/browser/views/browser_actions_container.h"
@@ -1133,8 +1134,18 @@
app_menu_contents_->AddSeparator();
#ifdef CHROME_PERSONALIZATION
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableSync)) {
- app_menu_contents_->AddItem(IDC_SYNC_BOOKMARKS,
- l10n_util::GetString(IDS_SYNC_MY_BOOKMARKS_LABEL) + L"...");
+ std::wstring label;
+ std::wstring link;
+ // TODO(timsteele): Need a ui helper method to just get the type without
+ // needing labels.
+ SyncStatusUIHelper::MessageType type = SyncStatusUIHelper::GetLabels(
+ browser_->profile()->GetProfileSyncService(), &label, &link);
+ label = type == SyncStatusUIHelper::SYNCED ?
+ l10n_util::GetString(IDS_SYNC_MENU_BOOKMARKS_SYNCED_LABEL) :
+ type == SyncStatusUIHelper::SYNC_ERROR ?
+ l10n_util::GetString(IDS_SYNC_MENU_BOOKMARK_SYNC_ERROR_LABEL) :
+ l10n_util::GetString(IDS_SYNC_START_SYNC_BUTTON_LABEL);
+ app_menu_contents_->AddItem(IDC_SYNC_BOOKMARKS, label);
app_menu_contents_->AddSeparator();
}
#endif
« no previous file with comments | « chrome/browser/views/sync/sync_setup_wizard_unittest.cc ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698