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

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

Issue 1380103004: Delay fetching account info until OnRefreshTokensLoaded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delay AFS fetch properly Created 5 years, 2 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 19 matching lines...) Expand all
30 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 30 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
31 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 31 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
32 #include "chrome/browser/password_manager/password_store_factory.h" 32 #include "chrome/browser/password_manager/password_store_factory.h"
33 #include "chrome/browser/prefs/incognito_mode_prefs.h" 33 #include "chrome/browser/prefs/incognito_mode_prefs.h"
34 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" 34 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h"
35 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 35 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
36 #include "chrome/browser/profiles/profile_destroyer.h" 36 #include "chrome/browser/profiles/profile_destroyer.h"
37 #include "chrome/browser/profiles/profile_info_cache.h" 37 #include "chrome/browser/profiles/profile_info_cache.h"
38 #include "chrome/browser/profiles/profile_metrics.h" 38 #include "chrome/browser/profiles/profile_metrics.h"
39 #include "chrome/browser/profiles/profiles_state.h" 39 #include "chrome/browser/profiles/profiles_state.h"
40 #include "chrome/browser/signin/account_fetcher_service_factory.h"
41 #include "chrome/browser/signin/account_reconcilor_factory.h" 40 #include "chrome/browser/signin/account_reconcilor_factory.h"
42 #include "chrome/browser/signin/account_tracker_service_factory.h" 41 #include "chrome/browser/signin/account_tracker_service_factory.h"
43 #include "chrome/browser/signin/cross_device_promo.h" 42 #include "chrome/browser/signin/cross_device_promo.h"
44 #include "chrome/browser/signin/cross_device_promo_factory.h" 43 #include "chrome/browser/signin/cross_device_promo_factory.h"
45 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" 44 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h"
46 #include "chrome/browser/signin/signin_manager_factory.h" 45 #include "chrome/browser/signin/signin_manager_factory.h"
47 #include "chrome/browser/sync/profile_sync_service.h" 46 #include "chrome/browser/sync/profile_sync_service.h"
48 #include "chrome/browser/sync/profile_sync_service_factory.h" 47 #include "chrome/browser/sync/profile_sync_service_factory.h"
49 #include "chrome/browser/ui/browser.h" 48 #include "chrome/browser/ui/browser.h"
50 #include "chrome/browser/ui/browser_iterator.h" 49 #include "chrome/browser/ui/browser_iterator.h"
51 #include "chrome/browser/ui/sync/sync_promo_ui.h" 50 #include "chrome/browser/ui/sync/sync_promo_ui.h"
52 #include "chrome/common/chrome_constants.h" 51 #include "chrome/common/chrome_constants.h"
53 #include "chrome/common/chrome_paths_internal.h" 52 #include "chrome/common/chrome_paths_internal.h"
54 #include "chrome/common/chrome_switches.h" 53 #include "chrome/common/chrome_switches.h"
55 #include "chrome/common/logging_chrome.h" 54 #include "chrome/common/logging_chrome.h"
56 #include "chrome/common/pref_names.h" 55 #include "chrome/common/pref_names.h"
57 #include "chrome/common/url_constants.h" 56 #include "chrome/common/url_constants.h"
58 #include "chrome/grit/generated_resources.h" 57 #include "chrome/grit/generated_resources.h"
59 #include "components/bookmarks/browser/bookmark_model.h" 58 #include "components/bookmarks/browser/bookmark_model.h"
60 #include "components/bookmarks/browser/startup_task_runner_service.h" 59 #include "components/bookmarks/browser/startup_task_runner_service.h"
61 #include "components/bookmarks/common/bookmark_pref_names.h" 60 #include "components/bookmarks/common/bookmark_pref_names.h"
62 #include "components/content_settings/core/browser/host_content_settings_map.h" 61 #include "components/content_settings/core/browser/host_content_settings_map.h"
63 #include "components/password_manager/core/browser/password_store.h" 62 #include "components/password_manager/core/browser/password_store.h"
64 #include "components/signin/core/browser/account_fetcher_service.h"
65 #include "components/signin/core/browser/account_tracker_service.h" 63 #include "components/signin/core/browser/account_tracker_service.h"
66 #include "components/signin/core/browser/gaia_cookie_manager_service.h" 64 #include "components/signin/core/browser/gaia_cookie_manager_service.h"
67 #include "components/signin/core/browser/signin_manager.h" 65 #include "components/signin/core/browser/signin_manager.h"
68 #include "components/signin/core/common/profile_management_switches.h" 66 #include "components/signin/core/common/profile_management_switches.h"
69 #include "components/signin/core/common/signin_pref_names.h" 67 #include "components/signin/core/common/signin_pref_names.h"
70 #include "content/public/browser/browser_thread.h" 68 #include "content/public/browser/browser_thread.h"
71 #include "content/public/browser/notification_service.h" 69 #include "content/public/browser/notification_service.h"
72 #include "content/public/browser/user_metrics.h" 70 #include "content/public/browser/user_metrics.h"
73 #include "content/public/common/content_switches.h" 71 #include "content/public/common/content_switches.h"
74 #include "net/http/http_transaction_factory.h" 72 #include "net/http/http_transaction_factory.h"
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 // Start the deferred task runners once the profile is loaded. 1104 // Start the deferred task runners once the profile is loaded.
1107 StartupTaskRunnerServiceFactory::GetForProfile(profile)-> 1105 StartupTaskRunnerServiceFactory::GetForProfile(profile)->
1108 StartDeferredTaskRunners(); 1106 StartDeferredTaskRunners();
1109 1107
1110 // Activate data reduction proxy. This creates a request context and makes a 1108 // Activate data reduction proxy. This creates a request context and makes a
1111 // URL request to check if the data reduction proxy server is reachable. 1109 // URL request to check if the data reduction proxy server is reachable.
1112 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile)-> 1110 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile)->
1113 MaybeActivateDataReductionProxy(true); 1111 MaybeActivateDataReductionProxy(true);
1114 1112
1115 GaiaCookieManagerServiceFactory::GetForProfile(profile)->Init(); 1113 GaiaCookieManagerServiceFactory::GetForProfile(profile)->Init();
1116 AccountFetcherServiceFactory::GetForProfile(profile)->EnableNetworkFetches();
1117 AccountReconcilorFactory::GetForProfile(profile); 1114 AccountReconcilorFactory::GetForProfile(profile);
1118 } 1115 }
1119 1116
1120 void ProfileManager::DoFinalInitLogging(Profile* profile) { 1117 void ProfileManager::DoFinalInitLogging(Profile* profile) {
1121 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging"); 1118 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitLogging");
1122 // Count number of extensions in this profile. 1119 // Count number of extensions in this profile.
1123 int enabled_app_count = -1; 1120 int enabled_app_count = -1;
1124 #if defined(ENABLE_EXTENSIONS) 1121 #if defined(ENABLE_EXTENSIONS)
1125 enabled_app_count = GetEnabledAppCount(profile); 1122 enabled_app_count = GetEnabledAppCount(profile);
1126 #endif 1123 #endif
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 1490
1494 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); 1491 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path);
1495 if (!original_callback.is_null()) 1492 if (!original_callback.is_null())
1496 original_callback.Run(loaded_profile, status); 1493 original_callback.Run(loaded_profile, status);
1497 } 1494 }
1498 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 1495 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
1499 1496
1500 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1497 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1501 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1498 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1502 } 1499 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698