summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 22:48:43 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 22:48:43 +0000
commit4693522c1de4eac9e9b2991402325fef54b5381b (patch)
tree6055390fdaf866276f0b720229ce3a84e744d93d /chrome/browser/views
parentcaa95c8a79b536d2fb023545484f13038e9db4a3 (diff)
downloadchromium_src-4693522c1de4eac9e9b2991402325fef54b5381b.zip
chromium_src-4693522c1de4eac9e9b2991402325fef54b5381b.tar.gz
chromium_src-4693522c1de4eac9e9b2991402325fef54b5381b.tar.bz2
Moved common OpenSyncMyBookmarksDialog() code into SyncStatusUIHelper.
BUG=none TEST=trybots Review URL: http://codereview.chromium.org/414064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc16
-rw-r--r--chrome/browser/views/bookmark_manager_view.h1
2 files changed, 2 insertions, 15 deletions
diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc
index dd717c4..30a9d21 100644
--- a/chrome/browser/views/bookmark_manager_view.cc
+++ b/chrome/browser/views/bookmark_manager_view.cc
@@ -21,7 +21,6 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/importer/importer.h"
#include "chrome/browser/metrics/user_metrics.h"
-#include "chrome/browser/options_window.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/sync/sync_status_ui_helper.h"
#include "chrome/browser/views/bookmark_editor_view.h"
@@ -513,7 +512,8 @@ void BookmarkManagerView::ButtonPressed(views::Button* sender,
const views::Event& event) {
if (sender == sync_status_button_) {
UserMetrics::RecordAction("BookmarkManager_Sync", profile_);
- OpenSyncMyBookmarksDialog();
+ SyncStatusUIHelper::OpenSyncMyBookmarksDialog(
+ profile_, ProfileSyncService::START_FROM_BOOKMARK_MANAGER);
}
}
@@ -830,15 +830,3 @@ void BookmarkManagerView::UpdateSyncStatus() {
sync_status_button_->SetText(status_label);
sync_status_button_->GetParent()->Layout();
}
-
-void BookmarkManagerView::OpenSyncMyBookmarksDialog() {
- if (!sync_service_)
- return;
- if (sync_service_->HasSyncSetupCompleted()) {
- ShowOptionsWindow(OPTIONS_PAGE_CONTENT, OPTIONS_GROUP_NONE, profile_);
- } else {
- sync_service_->EnableForUser();
- ProfileSyncService::SyncEvent(
- ProfileSyncService::START_FROM_BOOKMARK_MANAGER);
- }
-}
diff --git a/chrome/browser/views/bookmark_manager_view.h b/chrome/browser/views/bookmark_manager_view.h
index 1afe28d..aafa82a 100644
--- a/chrome/browser/views/bookmark_manager_view.h
+++ b/chrome/browser/views/bookmark_manager_view.h
@@ -209,7 +209,6 @@ class BookmarkManagerView : public views::View,
void ShowExportBookmarksFileChooser();
void UpdateSyncStatus();
- void OpenSyncMyBookmarksDialog();
Profile* profile_;
BookmarkTableView* table_view_;