diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-06 22:27:39 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-06 22:27:39 +0000 |
commit | 06eee70c5530309d7e17f47e5297c7218fa0a5f1 (patch) | |
tree | 87272869ba78f9bdde7c6b0835b07cf7c43a064a /chrome/browser/gtk/bookmark_bar_gtk.cc | |
parent | 8f1a633e90ac9bf4f959baeff321e35d5e031830 (diff) | |
download | chromium_src-06eee70c5530309d7e17f47e5297c7218fa0a5f1.zip chromium_src-06eee70c5530309d7e17f47e5297c7218fa0a5f1.tar.gz chromium_src-06eee70c5530309d7e17f47e5297c7218fa0a5f1.tar.bz2 |
sync: Add two functions to sync_ui_util header and update the callers accordingly.
* ShouldShowSyncErrorButton: added.
* GetSyncMenuLabel: added.
(original code review: http://codereview.chromium.org/501142 , patch by thiago.farina@gmail.com )
Review URL: http://codereview.chromium.org/519069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35656 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/bookmark_bar_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/bookmark_bar_gtk.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc index 31a7058..932e6ed 100644 --- a/chrome/browser/gtk/bookmark_bar_gtk.cc +++ b/chrome/browser/gtk/bookmark_bar_gtk.cc @@ -311,7 +311,7 @@ void BookmarkBarGtk::Show(bool animate) { gdk_window_lower(event_box_->window); } - if (ShouldShowSyncErrorButton()) { + if (sync_ui_util::ShouldShowSyncErrorButton(sync_service_)) { gtk_widget_show(sync_error_button_); } else { gtk_widget_hide(sync_error_button_); @@ -343,7 +343,7 @@ void BookmarkBarGtk::Hide(bool animate) { } void BookmarkBarGtk::OnStateChanged() { - if (ShouldShowSyncErrorButton()) { + if (sync_ui_util::ShouldShowSyncErrorButton(sync_service_)) { gtk_widget_show(sync_error_button_); } else { gtk_widget_hide(sync_error_button_); @@ -1297,10 +1297,3 @@ void BookmarkBarGtk::PopupForButtonNextTo(GtkWidget* button, button_idx = (button_idx + shift + folder_list.size()) % folder_list.size(); PopupForButton(folder_list[button_idx]); } - -// The sync state reported by the profile sync service determines whether or -// not the re-login indicator button should be visible. -bool BookmarkBarGtk::ShouldShowSyncErrorButton() { - return sync_service_ && sync_service_->HasSyncSetupCompleted() && - (sync_ui_util::GetStatus(sync_service_) == sync_ui_util::SYNC_ERROR); -} |