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

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

Issue 2700303002: cros: Unify oobe View/Actor naming to just View. (Closed)
Patch Set: Rebase Created 3 years, 10 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
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 "ash/common/system/chromeos/devicetype_utils.h" 7 #include "ash/common/system/chromeos/devicetype_utils.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/guid.h" 10 #include "base/guid.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // GAIA ID of the current user. 219 // GAIA ID of the current user.
220 std::string gaia_id; 220 std::string gaia_id;
221 221
222 // GAPS cookie. 222 // GAPS cookie.
223 std::string gaps_cookie; 223 std::string gaps_cookie;
224 }; 224 };
225 225
226 GaiaScreenHandler::GaiaContext::GaiaContext() {} 226 GaiaScreenHandler::GaiaContext::GaiaContext() {}
227 227
228 GaiaScreenHandler::GaiaScreenHandler( 228 GaiaScreenHandler::GaiaScreenHandler(
229 CoreOobeActor* core_oobe_actor, 229 CoreOobeView* core_oobe_view,
230 const scoped_refptr<NetworkStateInformer>& network_state_informer) 230 const scoped_refptr<NetworkStateInformer>& network_state_informer)
231 : network_state_informer_(network_state_informer), 231 : network_state_informer_(network_state_informer),
232 core_oobe_actor_(core_oobe_actor), 232 core_oobe_view_(core_oobe_view),
233 weak_factory_(this) { 233 weak_factory_(this) {
234 DCHECK(network_state_informer_.get()); 234 DCHECK(network_state_informer_.get());
235 set_call_js_prefix(kJsScreenPath); 235 set_call_js_prefix(kJsScreenPath);
236 } 236 }
237 237
238 GaiaScreenHandler::~GaiaScreenHandler() { 238 GaiaScreenHandler::~GaiaScreenHandler() {
239 if (network_portal_detector_) 239 if (network_portal_detector_)
240 network_portal_detector_->RemoveObserver(this); 240 network_portal_detector_->RemoveObserver(this);
241 } 241 }
242 242
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 UserContext user_context(account_id); 519 UserContext user_context(account_id);
520 user_context.SetKey(key); 520 user_context.SetKey(key);
521 user_context.SetAuthFlow(UserContext::AUTH_FLOW_ACTIVE_DIRECTORY); 521 user_context.SetAuthFlow(UserContext::AUTH_FLOW_ACTIVE_DIRECTORY);
522 user_context.SetIsUsingOAuth(false); 522 user_context.SetIsUsingOAuth(false);
523 user_context.SetUserType( 523 user_context.SetUserType(
524 user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY); 524 user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY);
525 Delegate()->CompleteLogin(user_context); 525 Delegate()->CompleteLogin(user_context);
526 break; 526 break;
527 } 527 }
528 case authpolicy::ERROR_PASSWORD_EXPIRED: 528 case authpolicy::ERROR_PASSWORD_EXPIRED:
529 core_oobe_actor_->ShowActiveDirectoryPasswordChangeScreen(username); 529 core_oobe_view_->ShowActiveDirectoryPasswordChangeScreen(username);
530 break; 530 break;
531 case authpolicy::ERROR_PARSE_UPN_FAILED: 531 case authpolicy::ERROR_PARSE_UPN_FAILED:
532 case authpolicy::ERROR_BAD_USER_NAME: 532 case authpolicy::ERROR_BAD_USER_NAME:
533 case authpolicy::ERROR_BAD_PASSWORD: 533 case authpolicy::ERROR_BAD_PASSWORD:
534 CallJS("invalidateAd", username); 534 CallJS("invalidateAd", username);
535 return; 535 return;
536 case authpolicy::ERROR_UNKNOWN: 536 case authpolicy::ERROR_UNKNOWN:
537 case authpolicy::ERROR_DBUS_FAILURE: 537 case authpolicy::ERROR_DBUS_FAILURE:
538 case authpolicy::ERROR_CANNOT_RESOLVE_KDC: 538 case authpolicy::ERROR_CANNOT_RESOLVE_KDC:
539 case authpolicy::ERROR_KINIT_FAILED: 539 case authpolicy::ERROR_KINIT_FAILED:
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 if (!system_im.empty()) { 867 if (!system_im.empty()) {
868 gaia_ime_state->ChangeInputMethod(system_im, false /* show_message */); 868 gaia_ime_state->ChangeInputMethod(system_im, false /* show_message */);
869 } else if (!owner_im.empty()) { 869 } else if (!owner_im.empty()) {
870 gaia_ime_state->ChangeInputMethod(owner_im, false /* show_message */); 870 gaia_ime_state->ChangeInputMethod(owner_im, false /* show_message */);
871 } 871 }
872 } 872 }
873 873
874 LoadAuthExtension(!gaia_silent_load_ /* force */, false /* offline */); 874 LoadAuthExtension(!gaia_silent_load_ /* force */, false /* offline */);
875 signin_screen_handler_->UpdateUIState( 875 signin_screen_handler_->UpdateUIState(
876 SigninScreenHandler::UI_STATE_GAIA_SIGNIN, nullptr); 876 SigninScreenHandler::UI_STATE_GAIA_SIGNIN, nullptr);
877 core_oobe_actor_->UpdateKeyboardState(); 877 core_oobe_view_->UpdateKeyboardState();
878 878
879 if (gaia_silent_load_) { 879 if (gaia_silent_load_) {
880 // The variable is assigned to false because silently loaded Gaia page was 880 // The variable is assigned to false because silently loaded Gaia page was
881 // used. 881 // used.
882 gaia_silent_load_ = false; 882 gaia_silent_load_ = false;
883 } 883 }
884 UpdateState(NetworkError::ERROR_REASON_UPDATE); 884 UpdateState(NetworkError::ERROR_REASON_UPDATE);
885 885
886 if (core_oobe_actor_) { 886 if (core_oobe_view_) {
887 PrefService* prefs = g_browser_process->local_state(); 887 PrefService* prefs = g_browser_process->local_state();
888 if (prefs->GetBoolean(prefs::kFactoryResetRequested)) { 888 if (prefs->GetBoolean(prefs::kFactoryResetRequested)) {
889 core_oobe_actor_->ShowDeviceResetScreen(); 889 core_oobe_view_->ShowDeviceResetScreen();
890 } else if (prefs->GetBoolean(prefs::kDebuggingFeaturesRequested)) { 890 } else if (prefs->GetBoolean(prefs::kDebuggingFeaturesRequested)) {
891 core_oobe_actor_->ShowEnableDebuggingScreen(); 891 core_oobe_view_->ShowEnableDebuggingScreen();
892 } 892 }
893 } 893 }
894 } 894 }
895 895
896 void GaiaScreenHandler::MaybePreloadAuthExtension() { 896 void GaiaScreenHandler::MaybePreloadAuthExtension() {
897 VLOG(1) << "MaybePreloadAuthExtension"; 897 VLOG(1) << "MaybePreloadAuthExtension";
898 898
899 if (!network_portal_detector_) { 899 if (!network_portal_detector_) {
900 NetworkPortalDetectorImpl* detector = new NetworkPortalDetectorImpl( 900 NetworkPortalDetectorImpl* detector = new NetworkPortalDetectorImpl(
901 g_browser_process->system_request_context(), false); 901 g_browser_process->system_request_context(), false);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 bool GaiaScreenHandler::IsRestrictiveProxy() const { 972 bool GaiaScreenHandler::IsRestrictiveProxy() const {
973 return !disable_restrictive_proxy_check_for_test_ && 973 return !disable_restrictive_proxy_check_for_test_ &&
974 !IsOnline(captive_portal_status_); 974 !IsOnline(captive_portal_status_);
975 } 975 }
976 976
977 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { 977 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() {
978 disable_restrictive_proxy_check_for_test_ = true; 978 disable_restrictive_proxy_check_for_test_ = true;
979 } 979 }
980 980
981 } // namespace chromeos 981 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698