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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc

Issue 1012083002: Resolve new GAIA flow's infinite loop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 5 years, 9 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
« no previous file with comments | « chrome/browser/resources/gaia_auth_host/authenticator.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/webui/chromeos/login/gaia_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 } 617 }
618 618
619 void GaiaScreenHandler::StartClearingCookies( 619 void GaiaScreenHandler::StartClearingCookies(
620 const base::Closure& on_clear_callback) { 620 const base::Closure& on_clear_callback) {
621 cookies_cleared_ = false; 621 cookies_cleared_ = false;
622 ProfileHelper* profile_helper = ProfileHelper::Get(); 622 ProfileHelper* profile_helper = ProfileHelper::Get();
623 LOG_ASSERT(Profile::FromWebUI(web_ui()) == 623 LOG_ASSERT(Profile::FromWebUI(web_ui()) ==
624 profile_helper->GetSigninProfile()); 624 profile_helper->GetSigninProfile());
625 profile_helper->ClearSigninProfile( 625 profile_helper->ClearSigninProfile(
626 base::Bind(&GaiaScreenHandler::OnCookiesCleared, 626 base::Bind(&GaiaScreenHandler::OnCookiesCleared,
627 weak_factory_.GetWeakPtr(), 627 weak_factory_.GetWeakPtr(), on_clear_callback),
628 on_clear_callback)); 628 StartupUtils::IsWebviewSigninEnabled() ? web_ui()->GetWebContents()
629 : nullptr);
629 } 630 }
630 631
631 void GaiaScreenHandler::OnCookiesCleared( 632 void GaiaScreenHandler::OnCookiesCleared(
632 const base::Closure& on_clear_callback) { 633 const base::Closure& on_clear_callback) {
633 DCHECK_CURRENTLY_ON(BrowserThread::UI); 634 DCHECK_CURRENTLY_ON(BrowserThread::UI);
634 cookies_cleared_ = true; 635 cookies_cleared_ = true;
635 on_clear_callback.Run(); 636 on_clear_callback.Run();
636 } 637 }
637 638
638 void GaiaScreenHandler::ShowSigninScreenForCreds(const std::string& username, 639 void GaiaScreenHandler::ShowSigninScreenForCreds(const std::string& username,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { 822 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() {
822 DCHECK(signin_screen_handler_); 823 DCHECK(signin_screen_handler_);
823 return signin_screen_handler_->delegate_; 824 return signin_screen_handler_->delegate_;
824 } 825 }
825 826
826 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { 827 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) {
827 signin_screen_handler_ = handler; 828 signin_screen_handler_ = handler;
828 } 829 }
829 830
830 } // namespace chromeos 831 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/resources/gaia_auth_host/authenticator.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698