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/user_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 userpolicy backend. | |
246 | |
Mattias Nissler (ping if slow)
2011/05/31 14:14:19
excess whitespace
sfeuz
2011/06/03 08:30:35
Done.
| |
247 policy::UserPolicyConnector* user_policy_connector = | |
248 g_browser_process->user_policy_connector(); | |
249 DCHECK(user_policy_connector); | |
250 user_policy_connector->Initialize(username_, | |
251 profile->GetPath(), | |
252 profile->GetTokenService()); | |
253 | |
244 BootTimesLoader* btl = BootTimesLoader::Get(); | 254 BootTimesLoader* btl = BootTimesLoader::Get(); |
245 btl->AddLoginTimeMarker("UserProfileGotten", false); | 255 btl->AddLoginTimeMarker("UserProfileGotten", false); |
246 | 256 |
247 bool first_login = !UserManager::Get()->IsKnownUser(username_); | 257 bool first_login = !UserManager::Get()->IsKnownUser(username_); |
248 // Change the proxy configuration service of the default request context to | 258 // Change the proxy configuration service of the default request context to |
249 // use the preference configuration from the logged-in profile. This ensures | 259 // use the preference configuration from the logged-in profile. This ensures |
250 // that requests done through the default context use the proxy configuration | 260 // that requests done through the default context use the proxy configuration |
251 // provided by configuration policy. | 261 // provided by configuration policy. |
252 // | 262 // |
253 // Note: Many of the clients of the default request context should probably be | 263 // Note: Many of the clients of the default request context should probably be |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
594 // Mark login host for deletion after browser starts. This | 604 // Mark login host for deletion after browser starts. This |
595 // guarantees that the message loop will be referenced by the | 605 // guarantees that the message loop will be referenced by the |
596 // browser before it is dereferenced by the login host. | 606 // browser before it is dereferenced by the login host. |
597 if (login_host) { | 607 if (login_host) { |
598 login_host->OnSessionStart(); | 608 login_host->OnSessionStart(); |
599 login_host = NULL; | 609 login_host = NULL; |
600 } | 610 } |
601 } | 611 } |
602 | 612 |
603 } // namespace chromeos | 613 } // namespace chromeos |
OLD | NEW |