| 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 18 matching lines...) Expand all Loading... |
| 29 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 29 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 30 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" | 30 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" |
| 31 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 31 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
| 32 #include "chrome/browser/profiles/profile_destroyer.h" | 32 #include "chrome/browser/profiles/profile_destroyer.h" |
| 33 #include "chrome/browser/profiles/profile_info_cache.h" | 33 #include "chrome/browser/profiles/profile_info_cache.h" |
| 34 #include "chrome/browser/profiles/profile_metrics.h" | 34 #include "chrome/browser/profiles/profile_metrics.h" |
| 35 #include "chrome/browser/profiles/profiles_state.h" | 35 #include "chrome/browser/profiles/profiles_state.h" |
| 36 #include "chrome/browser/profiles/startup_task_runner_service.h" | 36 #include "chrome/browser/profiles/startup_task_runner_service.h" |
| 37 #include "chrome/browser/profiles/startup_task_runner_service_factory.h" | 37 #include "chrome/browser/profiles/startup_task_runner_service_factory.h" |
| 38 #include "chrome/browser/signin/account_reconcilor_factory.h" | 38 #include "chrome/browser/signin/account_reconcilor_factory.h" |
| 39 #include "chrome/browser/signin/account_tracker_service_factory.h" | |
| 40 #include "chrome/browser/sync/profile_sync_service.h" | 39 #include "chrome/browser/sync/profile_sync_service.h" |
| 41 #include "chrome/browser/sync/profile_sync_service_factory.h" | 40 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 42 #include "chrome/browser/ui/browser.h" | 41 #include "chrome/browser/ui/browser.h" |
| 43 #include "chrome/browser/ui/browser_iterator.h" | 42 #include "chrome/browser/ui/browser_iterator.h" |
| 44 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 43 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
| 45 #include "chrome/common/chrome_constants.h" | 44 #include "chrome/common/chrome_constants.h" |
| 46 #include "chrome/common/chrome_paths_internal.h" | 45 #include "chrome/common/chrome_paths_internal.h" |
| 47 #include "chrome/common/chrome_switches.h" | 46 #include "chrome/common/chrome_switches.h" |
| 48 #include "chrome/common/logging_chrome.h" | 47 #include "chrome/common/logging_chrome.h" |
| 49 #include "chrome/common/pref_names.h" | 48 #include "chrome/common/pref_names.h" |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 #if defined(ENABLE_MANAGED_USERS) && !defined(OS_ANDROID) | 1006 #if defined(ENABLE_MANAGED_USERS) && !defined(OS_ANDROID) |
| 1008 // Initialization needs to happen after extension system initialization (for | 1007 // Initialization needs to happen after extension system initialization (for |
| 1009 // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the | 1008 // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the |
| 1010 // initializing the supervised flag if necessary). | 1009 // initializing the supervised flag if necessary). |
| 1011 SupervisedUserServiceFactory::GetForProfile(profile)->Init(); | 1010 SupervisedUserServiceFactory::GetForProfile(profile)->Init(); |
| 1012 #endif | 1011 #endif |
| 1013 // Start the deferred task runners once the profile is loaded. | 1012 // Start the deferred task runners once the profile is loaded. |
| 1014 StartupTaskRunnerServiceFactory::GetForProfile(profile)-> | 1013 StartupTaskRunnerServiceFactory::GetForProfile(profile)-> |
| 1015 StartDeferredTaskRunners(); | 1014 StartDeferredTaskRunners(); |
| 1016 | 1015 |
| 1017 AccountTrackerServiceFactory::GetForProfile(profile); | |
| 1018 AccountReconcilorFactory::GetForProfile(profile); | 1016 AccountReconcilorFactory::GetForProfile(profile); |
| 1019 } | 1017 } |
| 1020 | 1018 |
| 1021 void ProfileManager::DoFinalInitLogging(Profile* profile) { | 1019 void ProfileManager::DoFinalInitLogging(Profile* profile) { |
| 1022 // Count number of extensions in this profile. | 1020 // Count number of extensions in this profile. |
| 1023 int enabled_app_count = -1; | 1021 int enabled_app_count = -1; |
| 1024 #if defined(ENABLE_EXTENSIONS) | 1022 #if defined(ENABLE_EXTENSIONS) |
| 1025 enabled_app_count = GetEnabledAppCount(profile); | 1023 enabled_app_count = GetEnabledAppCount(profile); |
| 1026 #endif | 1024 #endif |
| 1027 | 1025 |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1325 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); | 1323 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); |
| 1326 FinishDeletingProfile(profile_to_delete_path); | 1324 FinishDeletingProfile(profile_to_delete_path); |
| 1327 } | 1325 } |
| 1328 } | 1326 } |
| 1329 } | 1327 } |
| 1330 #endif | 1328 #endif |
| 1331 | 1329 |
| 1332 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1330 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1333 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1331 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1334 } | 1332 } |
| OLD | NEW |