| 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 20 matching lines...) Expand all Loading... |
| 31 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" | 31 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" |
| 32 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 32 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
| 33 #include "chrome/browser/profiles/profile_destroyer.h" | 33 #include "chrome/browser/profiles/profile_destroyer.h" |
| 34 #include "chrome/browser/profiles/profile_info_cache.h" | 34 #include "chrome/browser/profiles/profile_info_cache.h" |
| 35 #include "chrome/browser/profiles/profile_metrics.h" | 35 #include "chrome/browser/profiles/profile_metrics.h" |
| 36 #include "chrome/browser/profiles/profiles_state.h" | 36 #include "chrome/browser/profiles/profiles_state.h" |
| 37 #include "chrome/browser/profiles/startup_task_runner_service.h" | 37 #include "chrome/browser/profiles/startup_task_runner_service.h" |
| 38 #include "chrome/browser/profiles/startup_task_runner_service_factory.h" | 38 #include "chrome/browser/profiles/startup_task_runner_service_factory.h" |
| 39 #include "chrome/browser/signin/account_reconcilor_factory.h" | 39 #include "chrome/browser/signin/account_reconcilor_factory.h" |
| 40 #include "chrome/browser/signin/account_tracker_service_factory.h" | 40 #include "chrome/browser/signin/account_tracker_service_factory.h" |
| 41 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" |
| 41 #include "chrome/browser/signin/signin_manager_factory.h" | 42 #include "chrome/browser/signin/signin_manager_factory.h" |
| 42 #include "chrome/browser/sync/profile_sync_service.h" | 43 #include "chrome/browser/sync/profile_sync_service.h" |
| 43 #include "chrome/browser/sync/profile_sync_service_factory.h" | 44 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 44 #include "chrome/browser/ui/browser.h" | 45 #include "chrome/browser/ui/browser.h" |
| 45 #include "chrome/browser/ui/browser_iterator.h" | 46 #include "chrome/browser/ui/browser_iterator.h" |
| 46 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 47 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
| 47 #include "chrome/common/chrome_constants.h" | 48 #include "chrome/common/chrome_constants.h" |
| 48 #include "chrome/common/chrome_paths_internal.h" | 49 #include "chrome/common/chrome_paths_internal.h" |
| 49 #include "chrome/common/chrome_switches.h" | 50 #include "chrome/common/chrome_switches.h" |
| 50 #include "chrome/common/logging_chrome.h" | 51 #include "chrome/common/logging_chrome.h" |
| 51 #include "chrome/common/pref_names.h" | 52 #include "chrome/common/pref_names.h" |
| 52 #include "chrome/common/url_constants.h" | 53 #include "chrome/common/url_constants.h" |
| 53 #include "chrome/grit/generated_resources.h" | 54 #include "chrome/grit/generated_resources.h" |
| 54 #include "components/bookmarks/browser/bookmark_model.h" | 55 #include "components/bookmarks/browser/bookmark_model.h" |
| 55 #include "components/content_settings/core/browser/host_content_settings_map.h" | 56 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 56 #include "components/password_manager/core/browser/password_store.h" | 57 #include "components/password_manager/core/browser/password_store.h" |
| 57 #include "components/signin/core/browser/account_tracker_service.h" | 58 #include "components/signin/core/browser/account_tracker_service.h" |
| 59 #include "components/signin/core/browser/gaia_cookie_manager_service.h" |
| 58 #include "components/signin/core/browser/signin_manager.h" | 60 #include "components/signin/core/browser/signin_manager.h" |
| 59 #include "components/signin/core/common/profile_management_switches.h" | 61 #include "components/signin/core/common/profile_management_switches.h" |
| 60 #include "content/public/browser/browser_thread.h" | 62 #include "content/public/browser/browser_thread.h" |
| 61 #include "content/public/browser/notification_service.h" | 63 #include "content/public/browser/notification_service.h" |
| 62 #include "content/public/browser/user_metrics.h" | 64 #include "content/public/browser/user_metrics.h" |
| 63 #include "net/http/http_transaction_factory.h" | 65 #include "net/http/http_transaction_factory.h" |
| 64 #include "net/url_request/url_request_context.h" | 66 #include "net/url_request/url_request_context.h" |
| 65 #include "net/url_request/url_request_context_getter.h" | 67 #include "net/url_request/url_request_context_getter.h" |
| 66 #include "net/url_request/url_request_job.h" | 68 #include "net/url_request/url_request_job.h" |
| 67 #include "ui/base/l10n/l10n_util.h" | 69 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 #endif | 1038 #endif |
| 1037 // Start the deferred task runners once the profile is loaded. | 1039 // Start the deferred task runners once the profile is loaded. |
| 1038 StartupTaskRunnerServiceFactory::GetForProfile(profile)-> | 1040 StartupTaskRunnerServiceFactory::GetForProfile(profile)-> |
| 1039 StartDeferredTaskRunners(); | 1041 StartDeferredTaskRunners(); |
| 1040 | 1042 |
| 1041 // Activate data reduction proxy. This creates a request context and makes a | 1043 // Activate data reduction proxy. This creates a request context and makes a |
| 1042 // URL request to check if the data reduction proxy server is reachable. | 1044 // URL request to check if the data reduction proxy server is reachable. |
| 1043 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile)-> | 1045 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile)-> |
| 1044 MaybeActivateDataReductionProxy(true); | 1046 MaybeActivateDataReductionProxy(true); |
| 1045 | 1047 |
| 1048 GaiaCookieManagerServiceFactory::GetForProfile(profile)->Init(); |
| 1046 AccountTrackerServiceFactory::GetForProfile(profile)->EnableNetworkFetches(); | 1049 AccountTrackerServiceFactory::GetForProfile(profile)->EnableNetworkFetches(); |
| 1047 AccountReconcilorFactory::GetForProfile(profile); | 1050 AccountReconcilorFactory::GetForProfile(profile); |
| 1048 } | 1051 } |
| 1049 | 1052 |
| 1050 void ProfileManager::DoFinalInitLogging(Profile* profile) { | 1053 void ProfileManager::DoFinalInitLogging(Profile* profile) { |
| 1051 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); | 1054 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); |
| 1052 // Count number of extensions in this profile. | 1055 // Count number of extensions in this profile. |
| 1053 int enabled_app_count = -1; | 1056 int enabled_app_count = -1; |
| 1054 #if defined(ENABLE_EXTENSIONS) | 1057 #if defined(ENABLE_EXTENSIONS) |
| 1055 enabled_app_count = GetEnabledAppCount(profile); | 1058 enabled_app_count = GetEnabledAppCount(profile); |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 } | 1396 } |
| 1394 | 1397 |
| 1395 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1398 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
| 1396 if (!original_callback.is_null()) | 1399 if (!original_callback.is_null()) |
| 1397 original_callback.Run(loaded_profile, status); | 1400 original_callback.Run(loaded_profile, status); |
| 1398 } | 1401 } |
| 1399 | 1402 |
| 1400 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1403 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1401 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1404 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1402 } | 1405 } |
| OLD | NEW |