OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/login/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "chrome/browser/chromeos/login/ownership_service.h" | 31 #include "chrome/browser/chromeos/login/ownership_service.h" |
32 #include "chrome/browser/chromeos/login/parallel_authenticator.h" | 32 #include "chrome/browser/chromeos/login/parallel_authenticator.h" |
33 #include "chrome/browser/chromeos/login/user_manager.h" | 33 #include "chrome/browser/chromeos/login/user_manager.h" |
34 #include "chrome/browser/chromeos/proxy_config_service.h" | 34 #include "chrome/browser/chromeos/proxy_config_service.h" |
35 #include "chrome/browser/extensions/extension_service.h" | 35 #include "chrome/browser/extensions/extension_service.h" |
36 #include "chrome/browser/net/chrome_url_request_context.h" | 36 #include "chrome/browser/net/chrome_url_request_context.h" |
37 #include "chrome/browser/net/gaia/token_service.h" | 37 #include "chrome/browser/net/gaia/token_service.h" |
38 #include "chrome/browser/net/preconnect.h" | 38 #include "chrome/browser/net/preconnect.h" |
39 #include "chrome/browser/net/pref_proxy_config_service.h" | 39 #include "chrome/browser/net/pref_proxy_config_service.h" |
40 #include "chrome/browser/plugin_updater.h" | 40 #include "chrome/browser/plugin_updater.h" |
| 41 #include "chrome/browser/policy/browser_policy_connector.h" |
41 #include "chrome/browser/prefs/pref_member.h" | 42 #include "chrome/browser/prefs/pref_member.h" |
42 #include "chrome/browser/profiles/profile.h" | 43 #include "chrome/browser/profiles/profile.h" |
43 #include "chrome/browser/profiles/profile_manager.h" | 44 #include "chrome/browser/profiles/profile_manager.h" |
44 #include "chrome/browser/sync/profile_sync_service.h" | 45 #include "chrome/browser/sync/profile_sync_service.h" |
45 #include "chrome/browser/ui/browser_init.h" | 46 #include "chrome/browser/ui/browser_init.h" |
46 #include "chrome/common/chrome_paths.h" | 47 #include "chrome/common/chrome_paths.h" |
47 #include "chrome/common/chrome_switches.h" | 48 #include "chrome/common/chrome_switches.h" |
48 #include "chrome/common/logging_chrome.h" | 49 #include "chrome/common/logging_chrome.h" |
49 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" | 50 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" |
50 #include "chrome/common/net/gaia/gaia_constants.h" | 51 #include "chrome/common/net/gaia/gaia_constants.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 delegate_ = delegate; | 235 delegate_ = delegate; |
235 | 236 |
236 // The default profile will have been changed because the ProfileManager | 237 // The default profile will have been changed because the ProfileManager |
237 // will process the notification that the UserManager sends out. | 238 // will process the notification that the UserManager sends out. |
238 ProfileManager::CreateDefaultProfileAsync(this); | 239 ProfileManager::CreateDefaultProfileAsync(this); |
239 } | 240 } |
240 | 241 |
241 void LoginUtilsImpl::OnProfileCreated(Profile* profile) { | 242 void LoginUtilsImpl::OnProfileCreated(Profile* profile) { |
242 CHECK(profile); | 243 CHECK(profile); |
243 | 244 |
| 245 // Initialize the user-policy backend. |
| 246 policy::BrowserPolicyConnector* browser_policy_connector = |
| 247 g_browser_process->browser_policy_connector(); |
| 248 browser_policy_connector->InitializeUserPolicy(username_, |
| 249 profile->GetPath(), |
| 250 profile->GetTokenService()); |
| 251 |
244 BootTimesLoader* btl = BootTimesLoader::Get(); | 252 BootTimesLoader* btl = BootTimesLoader::Get(); |
245 btl->AddLoginTimeMarker("UserProfileGotten", false); | 253 btl->AddLoginTimeMarker("UserProfileGotten", false); |
246 | 254 |
247 // Change the proxy configuration service of the default request context to | 255 // Change the proxy configuration service of the default request context to |
248 // use the preference configuration from the logged-in profile. This ensures | 256 // use the preference configuration from the logged-in profile. This ensures |
249 // that requests done through the default context use the proxy configuration | 257 // that requests done through the default context use the proxy configuration |
250 // provided by configuration policy. | 258 // provided by configuration policy. |
251 // | 259 // |
252 // Note: Many of the clients of the default request context should probably be | 260 // Note: Many of the clients of the default request context should probably be |
253 // fixed to use the request context of the profile they are associated with. | 261 // fixed to use the request context of the profile they are associated with. |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 // Mark login host for deletion after browser starts. This | 601 // Mark login host for deletion after browser starts. This |
594 // guarantees that the message loop will be referenced by the | 602 // guarantees that the message loop will be referenced by the |
595 // browser before it is dereferenced by the login host. | 603 // browser before it is dereferenced by the login host. |
596 if (login_host) { | 604 if (login_host) { |
597 login_host->OnSessionStart(); | 605 login_host->OnSessionStart(); |
598 login_host = NULL; | 606 login_host = NULL; |
599 } | 607 } |
600 } | 608 } |
601 | 609 |
602 } // namespace chromeos | 610 } // namespace chromeos |
OLD | NEW |