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

Unified Diff: chrome/browser/views/options/content_page_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/options/content_page_view.h ('k') | chrome/browser/views/sync/sync_setup_flow.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/options/content_page_view.cc
===================================================================
--- chrome/browser/views/options/content_page_view.cc (revision 29168)
+++ chrome/browser/views/options/content_page_view.cc (working copy)
@@ -128,9 +128,19 @@
#ifdef CHROME_PERSONALIZATION
} else if (sender == sync_start_stop_button_) {
DCHECK(sync_service_);
+
if (sync_service_->HasSyncSetupCompleted()) {
- sync_service_->DisableForUser();
- ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
+ ConfirmMessageBoxDialog::RunWithCustomConfiguration(
+ GetWindow()->GetNativeWindow(),
+ this,
+ l10n_util::GetString(IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL),
+ l10n_util::GetString(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL),
+ l10n_util::GetString(IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL),
+ l10n_util::GetString(IDS_CANCEL),
+ gfx::Size(views::Window::GetLocalizedContentsSize(
+ IDS_CONFIRM_STOP_SYNCING_DIALOG_WIDTH_CHARS,
+ IDS_CONFIRM_STOP_SYNCING_DIALOG_HEIGHT_LINES)));
+ return;
} else {
sync_service_->EnableForUser();
ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS);
@@ -422,6 +432,11 @@
L"", true);
}
+void ContentPageView::OnConfirmMessageAccept() {
+ sync_service_->DisableForUser();
+ ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
+}
+
#ifdef CHROME_PERSONALIZATION
void ContentPageView::InitSyncGroup() {
sync_status_label_ = new views::Label;
« no previous file with comments | « chrome/browser/views/options/content_page_view.h ('k') | chrome/browser/views/sync/sync_setup_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698