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

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

Issue 2952903002: ChromeOS: Add support for Gaia v2 API to FakeGaia and screen handler. (Closed)
Patch Set: Disable v2 by default Created 3 years, 5 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 | « no previous file | google_apis/gaia/fake_gaia.cc » ('j') | 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 "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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 344 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
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 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 355 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
355 switches::kCrosGaiaApiV1)) { 356 switches::kCrosGaiaApiV1)) {
356 params.SetString("chromeOSApiVersion", "1"); 357 params.SetString("chromeOSApiVersion", "1");
358 } else if (use_easy_bootstrap_) {
359 // Easy bootstrap is not v2-compatible
360 params.SetString("chromeOSApiVersion", "1");
357 } 361 }
358 362
359 frame_state_ = FRAME_STATE_LOADING; 363 frame_state_ = FRAME_STATE_LOADING;
360 CallJS("loadAuthExtension", params); 364 CallJS("loadAuthExtension", params);
361 } 365 }
362 366
363 void GaiaScreenHandler::ReloadGaia(bool force_reload) { 367 void GaiaScreenHandler::ReloadGaia(bool force_reload) {
364 if (frame_state_ == FRAME_STATE_LOADING && !force_reload) { 368 if (frame_state_ == FRAME_STATE_LOADING && !force_reload) {
365 VLOG(1) << "Skipping reloading of Gaia since gaia is loading."; 369 VLOG(1) << "Skipping reloading of Gaia since gaia is loading.";
366 return; 370 return;
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { 991 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() {
988 return signin_screen_handler_->delegate_; 992 return signin_screen_handler_->delegate_;
989 } 993 }
990 994
991 bool GaiaScreenHandler::IsRestrictiveProxy() const { 995 bool GaiaScreenHandler::IsRestrictiveProxy() const {
992 return !disable_restrictive_proxy_check_for_test_ && 996 return !disable_restrictive_proxy_check_for_test_ &&
993 !IsOnline(captive_portal_status_); 997 !IsOnline(captive_portal_status_);
994 } 998 }
995 999
996 } // namespace chromeos 1000 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | google_apis/gaia/fake_gaia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698