Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 21 matching lines...) Expand all
32 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" 32 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h"
33 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 33 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
34 #include "chrome/browser/profiles/profile_destroyer.h" 34 #include "chrome/browser/profiles/profile_destroyer.h"
35 #include "chrome/browser/profiles/profile_info_cache.h" 35 #include "chrome/browser/profiles/profile_info_cache.h"
36 #include "chrome/browser/profiles/profile_metrics.h" 36 #include "chrome/browser/profiles/profile_metrics.h"
37 #include "chrome/browser/profiles/profiles_state.h" 37 #include "chrome/browser/profiles/profiles_state.h"
38 #include "chrome/browser/profiles/startup_task_runner_service.h" 38 #include "chrome/browser/profiles/startup_task_runner_service.h"
39 #include "chrome/browser/profiles/startup_task_runner_service_factory.h" 39 #include "chrome/browser/profiles/startup_task_runner_service_factory.h"
40 #include "chrome/browser/signin/account_reconcilor_factory.h" 40 #include "chrome/browser/signin/account_reconcilor_factory.h"
41 #include "chrome/browser/signin/account_tracker_service_factory.h" 41 #include "chrome/browser/signin/account_tracker_service_factory.h"
42 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h"
42 #include "chrome/browser/signin/signin_manager_factory.h" 43 #include "chrome/browser/signin/signin_manager_factory.h"
43 #include "chrome/browser/sync/profile_sync_service.h" 44 #include "chrome/browser/sync/profile_sync_service.h"
44 #include "chrome/browser/sync/profile_sync_service_factory.h" 45 #include "chrome/browser/sync/profile_sync_service_factory.h"
45 #include "chrome/browser/ui/browser.h" 46 #include "chrome/browser/ui/browser.h"
46 #include "chrome/browser/ui/browser_iterator.h" 47 #include "chrome/browser/ui/browser_iterator.h"
47 #include "chrome/browser/ui/sync/sync_promo_ui.h" 48 #include "chrome/browser/ui/sync/sync_promo_ui.h"
48 #include "chrome/common/chrome_constants.h" 49 #include "chrome/common/chrome_constants.h"
49 #include "chrome/common/chrome_paths_internal.h" 50 #include "chrome/common/chrome_paths_internal.h"
50 #include "chrome/common/chrome_switches.h" 51 #include "chrome/common/chrome_switches.h"
51 #include "chrome/common/logging_chrome.h" 52 #include "chrome/common/logging_chrome.h"
52 #include "chrome/common/pref_names.h" 53 #include "chrome/common/pref_names.h"
53 #include "chrome/common/url_constants.h" 54 #include "chrome/common/url_constants.h"
54 #include "chrome/grit/generated_resources.h" 55 #include "chrome/grit/generated_resources.h"
55 #include "components/bookmarks/browser/bookmark_model.h" 56 #include "components/bookmarks/browser/bookmark_model.h"
56 #include "components/content_settings/core/browser/host_content_settings_map.h" 57 #include "components/content_settings/core/browser/host_content_settings_map.h"
57 #include "components/password_manager/core/browser/password_store.h" 58 #include "components/password_manager/core/browser/password_store.h"
58 #include "components/signin/core/browser/account_tracker_service.h" 59 #include "components/signin/core/browser/account_tracker_service.h"
60 #include "components/signin/core/browser/gaia_cookie_manager_service.h"
59 #include "components/signin/core/browser/signin_manager.h" 61 #include "components/signin/core/browser/signin_manager.h"
60 #include "components/signin/core/common/profile_management_switches.h" 62 #include "components/signin/core/common/profile_management_switches.h"
61 #include "content/public/browser/browser_thread.h" 63 #include "content/public/browser/browser_thread.h"
62 #include "content/public/browser/notification_service.h" 64 #include "content/public/browser/notification_service.h"
63 #include "content/public/browser/user_metrics.h" 65 #include "content/public/browser/user_metrics.h"
64 #include "net/http/http_transaction_factory.h" 66 #include "net/http/http_transaction_factory.h"
65 #include "net/url_request/url_request_context.h" 67 #include "net/url_request/url_request_context.h"
66 #include "net/url_request/url_request_context_getter.h" 68 #include "net/url_request/url_request_context_getter.h"
67 #include "net/url_request/url_request_job.h" 69 #include "net/url_request/url_request_job.h"
68 #include "ui/base/l10n/l10n_util.h" 70 #include "ui/base/l10n/l10n_util.h"
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 #endif 1048 #endif
1047 // Start the deferred task runners once the profile is loaded. 1049 // Start the deferred task runners once the profile is loaded.
1048 StartupTaskRunnerServiceFactory::GetForProfile(profile)-> 1050 StartupTaskRunnerServiceFactory::GetForProfile(profile)->
1049 StartDeferredTaskRunners(); 1051 StartDeferredTaskRunners();
1050 1052
1051 // Activate data reduction proxy. This creates a request context and makes a 1053 // Activate data reduction proxy. This creates a request context and makes a
1052 // URL request to check if the data reduction proxy server is reachable. 1054 // URL request to check if the data reduction proxy server is reachable.
1053 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile)-> 1055 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile)->
1054 MaybeActivateDataReductionProxy(true); 1056 MaybeActivateDataReductionProxy(true);
1055 1057
1058 GaiaCookieManagerServiceFactory::GetForProfile(profile)->Init();
1056 AccountTrackerServiceFactory::GetForProfile(profile)->EnableNetworkFetches(); 1059 AccountTrackerServiceFactory::GetForProfile(profile)->EnableNetworkFetches();
1057 AccountReconcilorFactory::GetForProfile(profile); 1060 AccountReconcilorFactory::GetForProfile(profile);
1058 } 1061 }
1059 1062
1060 void ProfileManager::DoFinalInitLogging(Profile* profile) { 1063 void ProfileManager::DoFinalInitLogging(Profile* profile) {
1061 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); 1064 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging");
1062 // Count number of extensions in this profile. 1065 // Count number of extensions in this profile.
1063 int enabled_app_count = -1; 1066 int enabled_app_count = -1;
1064 #if defined(ENABLE_EXTENSIONS) 1067 #if defined(ENABLE_EXTENSIONS)
1065 enabled_app_count = GetEnabledAppCount(profile); 1068 enabled_app_count = GetEnabledAppCount(profile);
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 } 1417 }
1415 1418
1416 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); 1419 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path);
1417 if (!original_callback.is_null()) 1420 if (!original_callback.is_null())
1418 original_callback.Run(loaded_profile, status); 1421 original_callback.Run(loaded_profile, status);
1419 } 1422 }
1420 1423
1421 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1424 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1422 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1425 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1423 } 1426 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698