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 "ash/system/devicetype_utils.h" | 7 #include "ash/system/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/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 if (command_line->HasSwitch(switches::kEafeUrl)) | 345 if (command_line->HasSwitch(switches::kEafeUrl)) |
346 eafe_url = command_line->GetSwitchValueASCII(switches::kEafeUrl); | 346 eafe_url = command_line->GetSwitchValueASCII(switches::kEafeUrl); |
347 std::string eafe_path = "planters/cbaudioChrome"; | 347 std::string eafe_path = "planters/cbaudioChrome"; |
348 if (command_line->HasSwitch(switches::kEafePath)) | 348 if (command_line->HasSwitch(switches::kEafePath)) |
349 eafe_path = command_line->GetSwitchValueASCII(switches::kEafePath); | 349 eafe_path = command_line->GetSwitchValueASCII(switches::kEafePath); |
350 | 350 |
351 params.SetString("gaiaUrl", eafe_url); | 351 params.SetString("gaiaUrl", eafe_url); |
352 params.SetString("gaiaPath", eafe_path); | 352 params.SetString("gaiaPath", eafe_path); |
353 } | 353 } |
354 | 354 |
| 355 // Easy bootstrap is not v2-compatible |
355 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 356 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
356 switches::kCrosGaiaApiV1)) { | 357 switches::kCrosGaiaApiV1) || |
| 358 use_easy_bootstrap_) { |
357 params.SetString("chromeOSApiVersion", "1"); | 359 params.SetString("chromeOSApiVersion", "1"); |
358 } else if (use_easy_bootstrap_) { | 360 } else { |
359 // Easy bootstrap is not v2-compatible | 361 // This enables GLIF MM UI for the online Gaia screen by default. |
360 params.SetString("chromeOSApiVersion", "1"); | 362 // (see https://crbug.com/709244 ). |
| 363 params.SetString("chromeOSApiVersion", "2"); |
361 } | 364 } |
362 | 365 |
363 frame_state_ = FRAME_STATE_LOADING; | 366 frame_state_ = FRAME_STATE_LOADING; |
364 CallJS("loadAuthExtension", params); | 367 CallJS("loadAuthExtension", params); |
365 } | 368 } |
366 | 369 |
367 void GaiaScreenHandler::ReloadGaia(bool force_reload) { | 370 void GaiaScreenHandler::ReloadGaia(bool force_reload) { |
368 if (frame_state_ == FRAME_STATE_LOADING && !force_reload) { | 371 if (frame_state_ == FRAME_STATE_LOADING && !force_reload) { |
369 VLOG(1) << "Skipping reloading of Gaia since gaia is loading."; | 372 VLOG(1) << "Skipping reloading of Gaia since gaia is loading."; |
370 return; | 373 return; |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 994 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
992 return signin_screen_handler_->delegate_; | 995 return signin_screen_handler_->delegate_; |
993 } | 996 } |
994 | 997 |
995 bool GaiaScreenHandler::IsRestrictiveProxy() const { | 998 bool GaiaScreenHandler::IsRestrictiveProxy() const { |
996 return !disable_restrictive_proxy_check_for_test_ && | 999 return !disable_restrictive_proxy_check_for_test_ && |
997 !IsOnline(captive_portal_status_); | 1000 !IsOnline(captive_portal_status_); |
998 } | 1001 } |
999 | 1002 |
1000 } // namespace chromeos | 1003 } // namespace chromeos |
OLD | NEW |