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" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/browser_shutdown.h" | 14 #include "chrome/browser/browser_shutdown.h" |
15 #include "chrome/browser/chromeos/chromeos_utils.h" | |
15 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 16 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
16 #include "chrome/browser/chromeos/language_preferences.h" | 17 #include "chrome/browser/chromeos/language_preferences.h" |
17 #include "chrome/browser/chromeos/login/screens/network_error.h" | 18 #include "chrome/browser/chromeos/login/screens/network_error.h" |
18 #include "chrome/browser/chromeos/login/startup_utils.h" | 19 #include "chrome/browser/chromeos/login/startup_utils.h" |
19 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" | 20 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
20 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 21 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
21 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 22 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
22 #include "chrome/browser/chromeos/policy/consumer_management_service.h" | 23 #include "chrome/browser/chromeos/policy/consumer_management_service.h" |
23 #include "chrome/browser/chromeos/policy/consumer_management_stage.h" | 24 #include "chrome/browser/chromeos/policy/consumer_management_stage.h" |
24 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 25 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
224 | 225 |
225 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 226 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
226 | 227 |
227 if (StartupUtils::IsWebviewSigninEnabled()) { | 228 if (StartupUtils::IsWebviewSigninEnabled()) { |
228 params.SetBoolean("useMinuteMaid", true); | 229 params.SetBoolean("useMinuteMaid", true); |
229 policy::BrowserPolicyConnectorChromeOS* connector = | 230 policy::BrowserPolicyConnectorChromeOS* connector = |
230 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 231 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
231 std::string enterprise_domain(connector->GetEnterpriseDomain()); | 232 std::string enterprise_domain(connector->GetEnterpriseDomain()); |
232 if (!enterprise_domain.empty()) | 233 if (!enterprise_domain.empty()) |
233 params.SetString("enterpriseDomain", enterprise_domain); | 234 params.SetString("enterpriseDomain", enterprise_domain); |
235 params.SetString("chromeType", GetChromeDeviceTypeForMinuteMaid()); | |
Nikita (slow)
2015/02/25 09:28:43
I suggest set this parameter only if device ID str
Roman Sorokin (ftl)
2015/02/25 10:28:39
Done.
| |
234 params.SetString("clientId", | 236 params.SetString("clientId", |
235 GaiaUrls::GetInstance()->oauth2_chrome_client_id()); | 237 GaiaUrls::GetInstance()->oauth2_chrome_client_id()); |
236 if (!command_line->HasSwitch(switches::kGaiaEndpointChromeOS)) { | 238 if (!command_line->HasSwitch(switches::kGaiaEndpointChromeOS)) { |
237 command_line->AppendSwitchASCII(switches::kGaiaEndpointChromeOS, | 239 command_line->AppendSwitchASCII(switches::kGaiaEndpointChromeOS, |
238 kMinuteMaidPath); | 240 kMinuteMaidPath); |
239 } | 241 } |
240 } | 242 } |
241 | 243 |
242 const GURL gaia_url = | 244 const GURL gaia_url = |
243 command_line->HasSwitch(::switches::kGaiaUrl) | 245 command_line->HasSwitch(::switches::kGaiaUrl) |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
783 | 785 |
784 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 786 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
785 DCHECK(signin_screen_handler_); | 787 DCHECK(signin_screen_handler_); |
786 return signin_screen_handler_->delegate_; | 788 return signin_screen_handler_->delegate_; |
787 } | 789 } |
788 | 790 |
789 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { | 791 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { |
790 signin_screen_handler_ = handler; | 792 signin_screen_handler_ = handler; |
791 } | 793 } |
792 } // namespace chromeos | 794 } // namespace chromeos |
OLD | NEW |