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

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

Issue 958843003: ChromeOS Gaia: When webview is enabled CrOS get oauth_code from accounts.sandbox.google.com and mak… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
index 5a5b4beb44fcf81c37b60163c8c5928d53fe6f0d..ace8995ccdd46eb08ad04b2c383174e6f7b78edb 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -55,6 +55,9 @@ const char kAuthIframeParentName[] = "signin-frame";
const char kAuthIframeParentOrigin[] =
"chrome-extension://mfffpogegjflfpflabcdkioaeobkgjik/";
+// TODO(rsorokin): Get rid of this url before the beta release. Issue tracking
+// that http://crbug/462204.
+const char kStagingGaiaUrl[] = "https://accounts.sandbox.google.com/";
// TODO(rsorokin): Move this to the proper file.
const char kMinuteMaidPath[] = "ChromeOsEmbeddedSetup";
@@ -243,11 +246,19 @@ void GaiaScreenHandler::LoadGaia(const GaiaContext& context) {
}
}
- const GURL gaia_url =
- command_line->HasSwitch(::switches::kGaiaUrl)
- ? GURL(command_line->GetSwitchValueASCII(::switches::kGaiaUrl))
- : GaiaUrls::GetInstance()->gaia_url();
- params.SetString("gaiaUrl", gaia_url.spec());
+ if (StartupUtils::IsWebviewSigninEnabled()) {
+ // We can't use switch --gaia-url in this case cause we need get
+ // auth_code from staging gaia and make all the other auths against prod
+ // gaia so user could use all the google services.
+ const GURL gaia_url = GURL(kStagingGaiaUrl);
+ params.SetString("gaiaUrl", gaia_url.spec());
+ } else {
+ const GURL gaia_url =
+ command_line->HasSwitch(::switches::kGaiaUrl)
+ ? GURL(command_line->GetSwitchValueASCII(::switches::kGaiaUrl))
+ : GaiaUrls::GetInstance()->gaia_url();
+ params.SetString("gaiaUrl", gaia_url.spec());
+ }
if (command_line->HasSwitch(switches::kGaiaEndpointChromeOS)) {
params.SetString("gaiaEndpoint", command_line->GetSwitchValueASCII(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698