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