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

Side by Side Diff: chrome/browser/views/options/content_page_view.cc

Issue 3305003: New authorization framework for sync. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/options/content_page_view.h" 5 #include "chrome/browser/views/options/content_page_view.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <vsstyle.h> 9 #include <vsstyle.h>
10 #include <vssym32.h> 10 #include <vssym32.h>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 l10n_util::GetStringF(IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL, 132 l10n_util::GetStringF(IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL,
133 l10n_util::GetString(IDS_PRODUCT_NAME)), 133 l10n_util::GetString(IDS_PRODUCT_NAME)),
134 l10n_util::GetString(IDS_SYNC_STOP_SYNCING_DIALOG_TITLE), 134 l10n_util::GetString(IDS_SYNC_STOP_SYNCING_DIALOG_TITLE),
135 l10n_util::GetString(IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL), 135 l10n_util::GetString(IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL),
136 l10n_util::GetString(IDS_CANCEL), 136 l10n_util::GetString(IDS_CANCEL),
137 gfx::Size(views::Window::GetLocalizedContentsSize( 137 gfx::Size(views::Window::GetLocalizedContentsSize(
138 IDS_CONFIRM_STOP_SYNCING_DIALOG_WIDTH_CHARS, 138 IDS_CONFIRM_STOP_SYNCING_DIALOG_WIDTH_CHARS,
139 IDS_CONFIRM_STOP_SYNCING_DIALOG_HEIGHT_LINES))); 139 IDS_CONFIRM_STOP_SYNCING_DIALOG_HEIGHT_LINES)));
140 return; 140 return;
141 } else { 141 } else {
142 sync_service_->EnableForUser(GetWindow()->GetNativeWindow()); 142 sync_service_->ShowLoginDialog(GetWindow()->GetNativeWindow());
143 ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS); 143 ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS);
144 } 144 }
145 } else if (sender == sync_customize_button_) { 145 } else if (sender == sync_customize_button_) {
146 // sync_customize_button_ should be invisible if sync is not yet set up. 146 // sync_customize_button_ should be invisible if sync is not yet set up.
147 DCHECK(sync_service_->HasSyncSetupCompleted()); 147 DCHECK(sync_service_->HasSyncSetupCompleted());
148 sync_service_->ShowChooseDataTypes(GetWindow()->GetNativeWindow()); 148 sync_service_->ShowChooseDataTypes(GetWindow()->GetNativeWindow());
149 } 149 }
150 } 150 }
151 151
152 void ContentPageView::LinkActivated(views::Link* source, int event_flags) { 152 void ContentPageView::LinkActivated(views::Link* source, int event_flags) {
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 sync_action_link_->SetEnabled(!managed); 490 sync_action_link_->SetEnabled(!managed);
491 491
492 if (status_has_error) { 492 if (status_has_error) {
493 sync_status_label_->set_background(CreateErrorBackground()); 493 sync_status_label_->set_background(CreateErrorBackground());
494 sync_action_link_->set_background(CreateErrorBackground()); 494 sync_action_link_->set_background(CreateErrorBackground());
495 } else { 495 } else {
496 sync_status_label_->set_background(NULL); 496 sync_status_label_->set_background(NULL);
497 sync_action_link_->set_background(NULL); 497 sync_action_link_->set_background(NULL);
498 } 498 }
499 } 499 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698