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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 239 |
240 params.SetString("chromeType", GetChromeDeviceTypeString()); | 240 params.SetString("chromeType", GetChromeDeviceTypeString()); |
241 params.SetString("clientId", | 241 params.SetString("clientId", |
242 GaiaUrls::GetInstance()->oauth2_chrome_client_id()); | 242 GaiaUrls::GetInstance()->oauth2_chrome_client_id()); |
243 if (!command_line->HasSwitch(switches::kGaiaEndpointChromeOS)) { | 243 if (!command_line->HasSwitch(switches::kGaiaEndpointChromeOS)) { |
244 command_line->AppendSwitchASCII(switches::kGaiaEndpointChromeOS, | 244 command_line->AppendSwitchASCII(switches::kGaiaEndpointChromeOS, |
245 kMinuteMaidPath); | 245 kMinuteMaidPath); |
246 } | 246 } |
247 } | 247 } |
248 | 248 |
249 if (StartupUtils::IsWebviewSigninEnabled()) { | 249 if (!command_line->HasSwitch(::switches::kGaiaUrl) && |
| 250 StartupUtils::IsWebviewSigninEnabled()) { |
250 // We can't use switch --gaia-url in this case cause we need get | 251 // We can't use switch --gaia-url in this case cause we need get |
251 // auth_code from staging gaia and make all the other auths against prod | 252 // auth_code from staging gaia and make all the other auths against prod |
252 // gaia so user could use all the google services. | 253 // gaia so user could use all the google services. |
| 254 // TODO(dpolukhin): crbug.com/462204 |
253 const GURL gaia_url = GURL(kStagingGaiaUrl); | 255 const GURL gaia_url = GURL(kStagingGaiaUrl); |
254 params.SetString("gaiaUrl", gaia_url.spec()); | 256 params.SetString("gaiaUrl", gaia_url.spec()); |
255 } else { | 257 } else { |
256 const GURL gaia_url = | 258 const GURL gaia_url = |
257 command_line->HasSwitch(::switches::kGaiaUrl) | 259 command_line->HasSwitch(::switches::kGaiaUrl) |
258 ? GURL(command_line->GetSwitchValueASCII(::switches::kGaiaUrl)) | 260 ? GURL(command_line->GetSwitchValueASCII(::switches::kGaiaUrl)) |
259 : GaiaUrls::GetInstance()->gaia_url(); | 261 : GaiaUrls::GetInstance()->gaia_url(); |
260 params.SetString("gaiaUrl", gaia_url.spec()); | 262 params.SetString("gaiaUrl", gaia_url.spec()); |
261 } | 263 } |
262 | 264 |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 | 800 |
799 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 801 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
800 DCHECK(signin_screen_handler_); | 802 DCHECK(signin_screen_handler_); |
801 return signin_screen_handler_->delegate_; | 803 return signin_screen_handler_->delegate_; |
802 } | 804 } |
803 | 805 |
804 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { | 806 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { |
805 signin_screen_handler_ = handler; | 807 signin_screen_handler_ = handler; |
806 } | 808 } |
807 } // namespace chromeos | 809 } // namespace chromeos |
OLD | NEW |