summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 03:54:40 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 03:54:40 +0000
commit40f04797e143e6b3fe59dbccdf7053aa2a7a2fe6 (patch)
tree0037cf6381a4876ee66f1f6330b0d1aef551815e /chrome/browser/views
parent6a7e698052d3b0d0aafebd5ac6af0ef2f95ff2a9 (diff)
downloadchromium_src-40f04797e143e6b3fe59dbccdf7053aa2a7a2fe6.zip
chromium_src-40f04797e143e6b3fe59dbccdf7053aa2a7a2fe6.tar.gz
chromium_src-40f04797e143e6b3fe59dbccdf7053aa2a7a2fe6.tar.bz2
Changed SyncStatusUIHelper namespace class into a real namespace (sync_ui_util), per style guide.
Changed static functions into anonymous-namespace functions. Renamed files/namespaces from sync_status_ui_helper to sync_ui_util. Moved sync_ui_util_mac.mm functions into sync_ui_util namespace. Updated all callers. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/414065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc8
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc8
-rw-r--r--chrome/browser/views/options/content_page_view.cc6
-rw-r--r--chrome/browser/views/toolbar_view.cc8
4 files changed, 15 insertions, 15 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index ebb80e9..3b95041 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -22,7 +22,7 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_widget_host_view.h"
-#include "chrome/browser/sync/sync_status_ui_helper.h"
+#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/browser/tab_contents/page_navigator.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/view_ids.h"
@@ -1687,10 +1687,10 @@ bool BookmarkBarView::ShouldShowSyncErrorButton() {
if (sync_service_ && sync_service_->HasSyncSetupCompleted()) {
string16 status_text;
string16 link_text;
- SyncStatusUIHelper::MessageType sync_status;
- sync_status = SyncStatusUIHelper::GetLabels(
+ sync_ui_util::MessageType sync_status;
+ sync_status = sync_ui_util::GetStatusLabels(
sync_service_, &status_text, &link_text);
- if (sync_status == SyncStatusUIHelper::SYNC_ERROR) {
+ if (sync_status == sync_ui_util::SYNC_ERROR) {
show_sync_error_button = true;
}
}
diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc
index 30a9d21..2446e8c 100644
--- a/chrome/browser/views/bookmark_manager_view.cc
+++ b/chrome/browser/views/bookmark_manager_view.cc
@@ -22,7 +22,7 @@
#include "chrome/browser/importer/importer.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/sync/sync_ui_util.h"
#include "chrome/browser/views/bookmark_editor_view.h"
#include "chrome/browser/views/bookmark_folder_tree_view.h"
#include "chrome/browser/views/bookmark_table_view.h"
@@ -512,7 +512,7 @@ void BookmarkManagerView::ButtonPressed(views::Button* sender,
const views::Event& event) {
if (sender == sync_status_button_) {
UserMetrics::RecordAction("BookmarkManager_Sync", profile_);
- SyncStatusUIHelper::OpenSyncMyBookmarksDialog(
+ sync_ui_util::OpenSyncMyBookmarksDialog(
profile_, ProfileSyncService::START_FROM_BOOKMARK_MANAGER);
}
}
@@ -818,8 +818,8 @@ void BookmarkManagerView::UpdateSyncStatus() {
DCHECK(sync_service_);
std::wstring status_label;
std::wstring link_label;
- bool synced = SyncStatusUIHelper::GetLabels(sync_service_,
- &status_label, &link_label) == SyncStatusUIHelper::SYNCED;
+ bool synced = sync_ui_util::GetStatusLabels(sync_service_,
+ &status_label, &link_label) == sync_ui_util::SYNCED;
if (sync_service_->HasSyncSetupCompleted()) {
std::wstring username = sync_service_->GetAuthenticatedUsername();
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index 17dd616..3189919 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_window.h"
-#include "chrome/browser/sync/sync_status_ui_helper.h"
+#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/browser/views/clear_browsing_data.h"
#include "chrome/browser/views/importer_view.h"
#include "chrome/browser/views/options/options_group_view.h"
@@ -458,8 +458,8 @@ void ContentPageView::UpdateSyncControls() {
std::wstring link_label;
std::wstring button_label;
bool sync_setup_completed = sync_service_->HasSyncSetupCompleted();
- bool status_has_error = SyncStatusUIHelper::GetLabels(sync_service_,
- &status_label, &link_label) == SyncStatusUIHelper::SYNC_ERROR;
+ bool status_has_error = sync_ui_util::GetStatusLabels(sync_service_,
+ &status_label, &link_label) == sync_ui_util::SYNC_ERROR;
if (sync_setup_completed) {
button_label = l10n_util::GetString(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL);
} else if (sync_service_->SetupInProgress()) {
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index 736b1ee..29a1e7a 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -28,7 +28,7 @@
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/sync_status_ui_helper.h"
+#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/user_data_manager.h"
@@ -1183,12 +1183,12 @@ void ToolbarView::CreateAppMenu() {
string16 link;
// TODO(timsteele): Need a ui helper method to just get the type without
// needing labels.
- SyncStatusUIHelper::MessageType type = SyncStatusUIHelper::GetLabels(
+ sync_ui_util::MessageType type = sync_ui_util::GetStatusLabels(
browser_->profile()->GetOriginalProfile()->GetProfileSyncService(),
&label, &link);
- label = type == SyncStatusUIHelper::SYNCED ?
+ label = type == sync_ui_util::SYNCED ?
l10n_util::GetStringUTF16(IDS_SYNC_MENU_BOOKMARKS_SYNCED_LABEL) :
- type == SyncStatusUIHelper::SYNC_ERROR ?
+ type == sync_ui_util::SYNC_ERROR ?
l10n_util::GetStringUTF16(IDS_SYNC_MENU_BOOKMARK_SYNC_ERROR_LABEL) :
l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL);
app_menu_contents_->AddItem(IDC_SYNC_BOOKMARKS, label);