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

Side by Side Diff: chrome/browser/browser_signin.cc

Issue 4980005: Allow sync with 2-factor StrongAuth accounts in ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactored 2-factor error passing Created 10 years, 1 month 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/browser_signin.h" 5 #include "chrome/browser/browser_signin.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 default: 271 default:
272 NOTREACHED(); 272 NOTREACHED();
273 } 273 }
274 } 274 }
275 275
276 void BrowserSignin::Cancel() { 276 void BrowserSignin::Cancel() {
277 if (delegate_) { 277 if (delegate_) {
278 delegate_->OnLoginFailure(GoogleServiceAuthError( 278 delegate_->OnLoginFailure(GoogleServiceAuthError(
279 GoogleServiceAuthError::REQUEST_CANCELED)); 279 GoogleServiceAuthError::REQUEST_CANCELED));
280 GetProfileSyncService()->OnUserCancelledDialog();
280 } 281 }
281 OnLoginFinished(); 282 OnLoginFinished();
282 } 283 }
283 284
284 void BrowserSignin::OnLoginFinished() { 285 void BrowserSignin::OnLoginFinished() {
285 if (html_dialog_ui_delegate_) 286 if (html_dialog_ui_delegate_)
286 html_dialog_ui_delegate_->ForceDialogClose(); 287 html_dialog_ui_delegate_->ForceDialogClose();
287 // The dialog will be deleted by DOMUI due to the dialog close, 288 // The dialog will be deleted by DOMUI due to the dialog close,
288 // don't hold a reference. 289 // don't hold a reference.
289 html_dialog_ui_delegate_ = NULL; 290 html_dialog_ui_delegate_ = NULL;
(...skipping 25 matching lines...) Expand all
315 registrar_.Remove(this, 316 registrar_.Remove(this,
316 NotificationType::GOOGLE_SIGNIN_SUCCESSFUL, 317 NotificationType::GOOGLE_SIGNIN_SUCCESSFUL,
317 Source<Profile>(profile_)); 318 Source<Profile>(profile_));
318 registrar_.Remove(this, 319 registrar_.Remove(this,
319 NotificationType::GOOGLE_SIGNIN_FAILED, 320 NotificationType::GOOGLE_SIGNIN_FAILED,
320 Source<Profile>(profile_)); 321 Source<Profile>(profile_));
321 } 322 }
322 323
323 void BrowserSignin::ShowSigninTabModal(TabContents* tab_contents) { 324 void BrowserSignin::ShowSigninTabModal(TabContents* tab_contents) {
324 // TODO(johnnyg): Need a linux views implementation for ConstrainedHtmlDialog. 325 // TODO(johnnyg): Need a linux views implementation for ConstrainedHtmlDialog.
325 #if defined(OS_WIN) || !defined(TOOLKIT_VIEWS) 326 #if defined(OS_WIN) || defined(OS_CHROMEOS) || !defined(TOOLKIT_VIEWS)
326 html_dialog_ui_delegate_ = CreateHtmlDialogUI(); 327 html_dialog_ui_delegate_ = CreateHtmlDialogUI();
327 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile_, 328 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile_,
328 html_dialog_ui_delegate_, 329 html_dialog_ui_delegate_,
329 tab_contents); 330 tab_contents);
330 #endif 331 #endif
331 } 332 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/existing_user_controller.cc » ('j') | chrome/browser/sync/profile_sync_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698