OLD | NEW |
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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 | 663 |
664 if (gaia_silent_load_) { | 664 if (gaia_silent_load_) { |
665 // The variable is assigned to false because silently loaded Gaia page was | 665 // The variable is assigned to false because silently loaded Gaia page was |
666 // used. | 666 // used. |
667 gaia_silent_load_ = false; | 667 gaia_silent_load_ = false; |
668 if (focus_stolen_) | 668 if (focus_stolen_) |
669 HandleGaiaUIReady(); | 669 HandleGaiaUIReady(); |
670 } | 670 } |
671 signin_screen_handler_->UpdateState(ErrorScreenActor::ERROR_REASON_UPDATE); | 671 signin_screen_handler_->UpdateState(ErrorScreenActor::ERROR_REASON_UPDATE); |
672 | 672 |
673 PrefService* prefs = g_browser_process->local_state(); | 673 if (core_oobe_actor_) { |
674 if (prefs->GetBoolean(prefs::kFactoryResetRequested)) { | 674 PrefService* prefs = g_browser_process->local_state(); |
675 if (core_oobe_actor_) | 675 if (prefs->GetBoolean(prefs::kFactoryResetRequested)) { |
676 core_oobe_actor_->ShowDeviceResetScreen(); | 676 core_oobe_actor_->ShowDeviceResetScreen(); |
| 677 } else if (prefs->GetBoolean(prefs::kDebuggingFeaturesRequested)) { |
| 678 core_oobe_actor_->ShowEnableDebuggingScreen(); |
| 679 } |
677 } | 680 } |
678 } | 681 } |
679 | 682 |
680 void GaiaScreenHandler::MaybePreloadAuthExtension() { | 683 void GaiaScreenHandler::MaybePreloadAuthExtension() { |
681 VLOG(1) << "MaybePreloadAuthExtension() call."; | 684 VLOG(1) << "MaybePreloadAuthExtension() call."; |
682 | 685 |
683 // If cookies clearing was initiated or |dns_clear_task_running_| then auth | 686 // If cookies clearing was initiated or |dns_clear_task_running_| then auth |
684 // extension showing has already been initiated and preloading is senseless. | 687 // extension showing has already been initiated and preloading is senseless. |
685 if (signin_screen_handler_->ShouldLoadGaia() && | 688 if (signin_screen_handler_->ShouldLoadGaia() && |
686 !gaia_silent_load_ && | 689 !gaia_silent_load_ && |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 | 729 |
727 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 730 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
728 DCHECK(signin_screen_handler_); | 731 DCHECK(signin_screen_handler_); |
729 return signin_screen_handler_->delegate_; | 732 return signin_screen_handler_->delegate_; |
730 } | 733 } |
731 | 734 |
732 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { | 735 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { |
733 signin_screen_handler_ = handler; | 736 signin_screen_handler_ = handler; |
734 } | 737 } |
735 } // namespace chromeos | 738 } // namespace chromeos |
OLD | NEW |