OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/profiles/profile_manager.h" | 5 #include "chrome/browser/profiles/profile_manager.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 15 matching lines...) Expand all Loading... | |
26 #include "chrome/browser/chrome_notification_types.h" | 26 #include "chrome/browser/chrome_notification_types.h" |
27 #include "chrome/browser/content_settings/host_content_settings_map.h" | 27 #include "chrome/browser/content_settings/host_content_settings_map.h" |
28 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 28 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
29 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" | 29 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" |
30 #include "chrome/browser/profiles/profile_destroyer.h" | 30 #include "chrome/browser/profiles/profile_destroyer.h" |
31 #include "chrome/browser/profiles/profile_info_cache.h" | 31 #include "chrome/browser/profiles/profile_info_cache.h" |
32 #include "chrome/browser/profiles/profile_metrics.h" | 32 #include "chrome/browser/profiles/profile_metrics.h" |
33 #include "chrome/browser/profiles/profiles_state.h" | 33 #include "chrome/browser/profiles/profiles_state.h" |
34 #include "chrome/browser/profiles/startup_task_runner_service.h" | 34 #include "chrome/browser/profiles/startup_task_runner_service.h" |
35 #include "chrome/browser/profiles/startup_task_runner_service_factory.h" | 35 #include "chrome/browser/profiles/startup_task_runner_service_factory.h" |
36 #include "chrome/browser/signin/account_reconcilor_factory.h" | |
36 #include "chrome/browser/sync/profile_sync_service.h" | 37 #include "chrome/browser/sync/profile_sync_service.h" |
37 #include "chrome/browser/sync/profile_sync_service_factory.h" | 38 #include "chrome/browser/sync/profile_sync_service_factory.h" |
38 #include "chrome/browser/ui/browser.h" | 39 #include "chrome/browser/ui/browser.h" |
39 #include "chrome/browser/ui/browser_iterator.h" | 40 #include "chrome/browser/ui/browser_iterator.h" |
40 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 41 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
41 #include "chrome/common/chrome_constants.h" | 42 #include "chrome/common/chrome_constants.h" |
42 #include "chrome/common/chrome_paths_internal.h" | 43 #include "chrome/common/chrome_paths_internal.h" |
43 #include "chrome/common/chrome_switches.h" | 44 #include "chrome/common/chrome_switches.h" |
44 #include "chrome/common/logging_chrome.h" | 45 #include "chrome/common/logging_chrome.h" |
45 #include "chrome/common/pref_names.h" | 46 #include "chrome/common/pref_names.h" |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
798 #endif | 799 #endif |
799 #if defined(ENABLE_MANAGED_USERS) | 800 #if defined(ENABLE_MANAGED_USERS) |
800 // Initialization needs to happen after extension system initialization (for | 801 // Initialization needs to happen after extension system initialization (for |
801 // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the | 802 // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the |
802 // initializing the managed flag if necessary). | 803 // initializing the managed flag if necessary). |
803 ManagedUserServiceFactory::GetForProfile(profile)->Init(); | 804 ManagedUserServiceFactory::GetForProfile(profile)->Init(); |
804 #endif | 805 #endif |
805 // Start the deferred task runners once the profile is loaded. | 806 // Start the deferred task runners once the profile is loaded. |
806 StartupTaskRunnerServiceFactory::GetForProfile(profile)-> | 807 StartupTaskRunnerServiceFactory::GetForProfile(profile)-> |
807 StartDeferredTaskRunners(); | 808 StartDeferredTaskRunners(); |
809 | |
810 if (profiles::IsNewProfileManagementEnabled()) | |
811 AccountReconcilorFactory::GetForProfile(profile); | |
acleung1
2013/11/07 03:46:32
Hmm this works when I patched it in a few days ago
| |
808 } | 812 } |
809 | 813 |
810 void ProfileManager::DoFinalInitLogging(Profile* profile) { | 814 void ProfileManager::DoFinalInitLogging(Profile* profile) { |
811 // Count number of extensions in this profile. | 815 // Count number of extensions in this profile. |
812 int extension_count = -1; | 816 int extension_count = -1; |
813 #if defined(ENABLE_EXTENSIONS) | 817 #if defined(ENABLE_EXTENSIONS) |
814 ExtensionService* extension_service = profile->GetExtensionService(); | 818 ExtensionService* extension_service = profile->GetExtensionService(); |
815 if (extension_service) | 819 if (extension_service) |
816 extension_count = extension_service->GetAppIds().size(); | 820 extension_count = extension_service->GetAppIds().size(); |
817 #endif | 821 #endif |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1212 ProfileManager::ProfileInfo::ProfileInfo( | 1216 ProfileManager::ProfileInfo::ProfileInfo( |
1213 Profile* profile, | 1217 Profile* profile, |
1214 bool created) | 1218 bool created) |
1215 : profile(profile), | 1219 : profile(profile), |
1216 created(created) { | 1220 created(created) { |
1217 } | 1221 } |
1218 | 1222 |
1219 ProfileManager::ProfileInfo::~ProfileInfo() { | 1223 ProfileManager::ProfileInfo::~ProfileInfo() { |
1220 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1224 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
1221 } | 1225 } |
OLD | NEW |