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

Side by Side Diff: chrome/browser/profiles/profile_impl.h

Issue 9232011: sync: Make ProfileSyncService a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 11 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 | Annotate | Revision Log
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 // This class gathers state related to a single user profile. 5 // This class gathers state related to a single user profile.
6 6
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
9 #pragma once 9 #pragma once
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/timer.h" 16 #include "base/timer.h"
17 #include "chrome/browser/prefs/pref_change_registrar.h" 17 #include "chrome/browser/prefs/pref_change_registrar.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_impl_io_data.h" 19 #include "chrome/browser/profiles/profile_impl_io_data.h"
20 #include "content/public/browser/notification_observer.h" 20 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 21 #include "content/public/browser/notification_registrar.h"
22 22
23 class ExtensionNavigationObserver; 23 class ExtensionNavigationObserver;
24 class ExtensionPrefs; 24 class ExtensionPrefs;
25 class ExtensionPrefValueMap; 25 class ExtensionPrefValueMap;
26 class NetPrefObserver; 26 class NetPrefObserver;
27 class PrefService; 27 class PrefService;
28 class ProfileSyncComponentsFactory; 28 class ProfileSyncService;
29 class PromoResourceService; 29 class PromoResourceService;
30 class SpeechInputPreferences; 30 class SpeechInputPreferences;
31 class SpellCheckProfile; 31 class SpellCheckProfile;
32 class SSLConfigServiceManager; 32 class SSLConfigServiceManager;
33 class VisitedLinkEventListener; 33 class VisitedLinkEventListener;
34 34
35 #if defined(OS_CHROMEOS) 35 #if defined(OS_CHROMEOS)
36 namespace chromeos { 36 namespace chromeos {
37 class EnterpriseExtensionObserver; 37 class EnterpriseExtensionObserver;
38 class LocaleChangeGuard; 38 class LocaleChangeGuard;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 const std::string& app_id) OVERRIDE; 104 const std::string& app_id) OVERRIDE;
105 virtual void RegisterExtensionWithRequestContexts( 105 virtual void RegisterExtensionWithRequestContexts(
106 const Extension* extension) OVERRIDE; 106 const Extension* extension) OVERRIDE;
107 virtual void UnregisterExtensionWithRequestContexts( 107 virtual void UnregisterExtensionWithRequestContexts(
108 const std::string& extension_id, 108 const std::string& extension_id,
109 const extension_misc::UnloadedExtensionReason reason) OVERRIDE; 109 const extension_misc::UnloadedExtensionReason reason) OVERRIDE;
110 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; 110 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE;
111 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; 111 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE;
112 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() OVERRIDE; 112 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() OVERRIDE;
113 virtual FindBarState* GetFindBarState() OVERRIDE; 113 virtual FindBarState* GetFindBarState() OVERRIDE;
114 virtual bool HasProfileSyncService() const OVERRIDE; 114 virtual bool HasProfileSyncService() OVERRIDE;
115 virtual bool DidLastSessionExitCleanly() OVERRIDE; 115 virtual bool DidLastSessionExitCleanly() OVERRIDE;
116 virtual BookmarkModel* GetBookmarkModel() OVERRIDE; 116 virtual BookmarkModel* GetBookmarkModel() OVERRIDE;
117 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; 117 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE;
118 virtual bool IsSameProfile(Profile* profile) OVERRIDE; 118 virtual bool IsSameProfile(Profile* profile) OVERRIDE;
119 virtual base::Time GetStartTime() const OVERRIDE; 119 virtual base::Time GetStartTime() const OVERRIDE;
120 virtual SpellCheckHost* GetSpellCheckHost() OVERRIDE; 120 virtual SpellCheckHost* GetSpellCheckHost() OVERRIDE;
121 virtual void ReinitializeSpellCheckHost(bool force) OVERRIDE; 121 virtual void ReinitializeSpellCheckHost(bool force) OVERRIDE;
122 virtual void MarkAsCleanShutdown() OVERRIDE; 122 virtual void MarkAsCleanShutdown() OVERRIDE;
123 virtual void InitExtensions(bool extensions_enabled) OVERRIDE; 123 virtual void InitExtensions(bool extensions_enabled) OVERRIDE;
124 virtual void InitPromoResources() OVERRIDE; 124 virtual void InitPromoResources() OVERRIDE;
125 virtual void InitRegisteredProtocolHandlers() OVERRIDE; 125 virtual void InitRegisteredProtocolHandlers() OVERRIDE;
126 virtual FilePath last_selected_directory() OVERRIDE; 126 virtual FilePath last_selected_directory() OVERRIDE;
127 virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; 127 virtual void set_last_selected_directory(const FilePath& path) OVERRIDE;
128 virtual ProfileSyncService* GetProfileSyncService() OVERRIDE; 128 virtual ProfileSyncService* GetProfileSyncService() OVERRIDE;
129 virtual TokenService* GetTokenService() OVERRIDE; 129 virtual TokenService* GetTokenService() OVERRIDE;
130 void InitSyncService();
131 virtual ExtensionInfoMap* GetExtensionInfoMap() OVERRIDE; 130 virtual ExtensionInfoMap* GetExtensionInfoMap() OVERRIDE;
132 virtual PromoCounter* GetInstantPromoCounter() OVERRIDE; 131 virtual PromoCounter* GetInstantPromoCounter() OVERRIDE;
133 virtual ChromeURLDataManager* GetChromeURLDataManager() OVERRIDE; 132 virtual ChromeURLDataManager* GetChromeURLDataManager() OVERRIDE;
134 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE; 133 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE;
135 virtual void ClearNetworkingHistorySince(base::Time time) OVERRIDE; 134 virtual void ClearNetworkingHistorySince(base::Time time) OVERRIDE;
136 virtual GURL GetHomePage() OVERRIDE; 135 virtual GURL GetHomePage() OVERRIDE;
137 virtual void SaveSessionState() OVERRIDE; 136 virtual void SaveSessionState() OVERRIDE;
138 137
139 #if defined(OS_CHROMEOS) 138 #if defined(OS_CHROMEOS)
140 virtual void ChangeAppLocale(const std::string& locale, 139 virtual void ChangeAppLocale(const std::string& locale,
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 scoped_refptr<ExtensionSpecialStoragePolicy> 238 scoped_refptr<ExtensionSpecialStoragePolicy>
240 extension_special_storage_policy_; 239 extension_special_storage_policy_;
241 scoped_ptr<SSLHostState> ssl_host_state_; 240 scoped_ptr<SSLHostState> ssl_host_state_;
242 scoped_ptr<NetPrefObserver> net_pref_observer_; 241 scoped_ptr<NetPrefObserver> net_pref_observer_;
243 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; 242 scoped_ptr<TemplateURLFetcher> template_url_fetcher_;
244 scoped_ptr<BookmarkModel> bookmark_bar_model_; 243 scoped_ptr<BookmarkModel> bookmark_bar_model_;
245 scoped_refptr<PromoResourceService> promo_resource_service_; 244 scoped_refptr<PromoResourceService> promo_resource_service_;
246 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; 245 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_;
247 246
248 scoped_ptr<TokenService> token_service_; 247 scoped_ptr<TokenService> token_service_;
249 scoped_ptr<ProfileSyncComponentsFactory> profile_sync_factory_;
250 scoped_ptr<ProfileSyncService> sync_service_;
251 248
252 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; 249 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
253 250
254 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 251 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
255 scoped_refptr<HostZoomMap> host_zoom_map_; 252 scoped_refptr<HostZoomMap> host_zoom_map_;
256 scoped_refptr<GeolocationPermissionContext> 253 scoped_refptr<GeolocationPermissionContext>
257 geolocation_permission_context_; 254 geolocation_permission_context_;
258 scoped_refptr<SpeechInputPreferences> speech_input_preferences_; 255 scoped_refptr<SpeechInputPreferences> speech_input_preferences_;
259 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; 256 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_;
260 scoped_ptr<FindBarState> find_bar_state_; 257 scoped_ptr<FindBarState> find_bar_state_;
261 scoped_ptr<GAIAInfoUpdateService> gaia_info_update_service_; 258 scoped_ptr<GAIAInfoUpdateService> gaia_info_update_service_;
262 scoped_refptr<HistoryService> history_service_; 259 scoped_refptr<HistoryService> history_service_;
263 scoped_ptr<FaviconService> favicon_service_; 260 scoped_ptr<FaviconService> favicon_service_;
264 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; 261 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_;
265 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; 262 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_;
266 scoped_refptr<WebDataService> web_data_service_; 263 scoped_refptr<WebDataService> web_data_service_;
267 scoped_refptr<PasswordStore> password_store_; 264 scoped_refptr<PasswordStore> password_store_;
268 scoped_refptr<WebKitContext> webkit_context_; 265 scoped_refptr<WebKitContext> webkit_context_;
269 scoped_refptr<fileapi::FileSystemContext> file_system_context_; 266 scoped_refptr<fileapi::FileSystemContext> file_system_context_;
270 scoped_refptr<quota::QuotaManager> quota_manager_; 267 scoped_refptr<quota::QuotaManager> quota_manager_;
271 bool profile_sync_service_created_;
272 bool history_service_created_; 268 bool history_service_created_;
273 bool favicon_service_created_; 269 bool favicon_service_created_;
274 bool created_web_data_service_; 270 bool created_web_data_service_;
275 bool created_password_store_; 271 bool created_password_store_;
276 bool clear_local_state_on_exit_; 272 bool clear_local_state_on_exit_;
277 // Whether or not the last session exited cleanly. This is set only once. 273 // Whether or not the last session exited cleanly. This is set only once.
278 bool last_session_exited_cleanly_; 274 bool last_session_exited_cleanly_;
279 275
280 base::OneShotTimer<ProfileImpl> create_session_service_timer_; 276 base::OneShotTimer<ProfileImpl> create_session_service_timer_;
281 277
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 Profile::Delegate* delegate_; 329 Profile::Delegate* delegate_;
334 330
335 chrome_browser_net::Predictor* predictor_; 331 chrome_browser_net::Predictor* predictor_;
336 332
337 bool session_restore_enabled_; 333 bool session_restore_enabled_;
338 334
339 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); 335 DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
340 }; 336 };
341 337
342 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 338 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_dependency_manager.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698