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

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: init 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 SigninManager* GetSigninManager() OVERRIDE; 129 virtual SigninManager* GetSigninManager() OVERRIDE;
130 virtual TokenService* GetTokenService() OVERRIDE; 130 virtual TokenService* GetTokenService() OVERRIDE;
131 void InitSyncService();
132 virtual ExtensionInfoMap* GetExtensionInfoMap() OVERRIDE; 131 virtual ExtensionInfoMap* GetExtensionInfoMap() OVERRIDE;
133 virtual PromoCounter* GetInstantPromoCounter() OVERRIDE; 132 virtual PromoCounter* GetInstantPromoCounter() OVERRIDE;
134 virtual ChromeURLDataManager* GetChromeURLDataManager() OVERRIDE; 133 virtual ChromeURLDataManager* GetChromeURLDataManager() OVERRIDE;
135 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE; 134 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE;
136 virtual void ClearNetworkingHistorySince(base::Time time) OVERRIDE; 135 virtual void ClearNetworkingHistorySince(base::Time time) OVERRIDE;
137 virtual GURL GetHomePage() OVERRIDE; 136 virtual GURL GetHomePage() OVERRIDE;
138 virtual void SaveSessionState() OVERRIDE; 137 virtual void SaveSessionState() OVERRIDE;
139 138
140 #if defined(OS_CHROMEOS) 139 #if defined(OS_CHROMEOS)
141 virtual void ChangeAppLocale(const std::string& locale, 140 virtual void ChangeAppLocale(const std::string& locale,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 extension_special_storage_policy_; 240 extension_special_storage_policy_;
242 scoped_ptr<SSLHostState> ssl_host_state_; 241 scoped_ptr<SSLHostState> ssl_host_state_;
243 scoped_ptr<NetPrefObserver> net_pref_observer_; 242 scoped_ptr<NetPrefObserver> net_pref_observer_;
244 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; 243 scoped_ptr<TemplateURLFetcher> template_url_fetcher_;
245 scoped_ptr<BookmarkModel> bookmark_bar_model_; 244 scoped_ptr<BookmarkModel> bookmark_bar_model_;
246 scoped_refptr<PromoResourceService> promo_resource_service_; 245 scoped_refptr<PromoResourceService> promo_resource_service_;
247 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; 246 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_;
248 247
249 scoped_ptr<SigninManager> signin_manager_; 248 scoped_ptr<SigninManager> signin_manager_;
250 scoped_ptr<TokenService> token_service_; 249 scoped_ptr<TokenService> token_service_;
251 scoped_ptr<ProfileSyncComponentsFactory> profile_sync_factory_;
252 scoped_ptr<ProfileSyncService> sync_service_;
253 250
254 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; 251 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
255 252
256 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 253 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
257 scoped_refptr<HostZoomMap> host_zoom_map_; 254 scoped_refptr<HostZoomMap> host_zoom_map_;
258 scoped_refptr<GeolocationPermissionContext> 255 scoped_refptr<GeolocationPermissionContext>
259 geolocation_permission_context_; 256 geolocation_permission_context_;
260 scoped_refptr<SpeechInputPreferences> speech_input_preferences_; 257 scoped_refptr<SpeechInputPreferences> speech_input_preferences_;
261 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; 258 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_;
262 scoped_ptr<FindBarState> find_bar_state_; 259 scoped_ptr<FindBarState> find_bar_state_;
263 scoped_ptr<GAIAInfoUpdateService> gaia_info_update_service_; 260 scoped_ptr<GAIAInfoUpdateService> gaia_info_update_service_;
264 scoped_refptr<HistoryService> history_service_; 261 scoped_refptr<HistoryService> history_service_;
265 scoped_ptr<FaviconService> favicon_service_; 262 scoped_ptr<FaviconService> favicon_service_;
266 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; 263 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_;
267 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; 264 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_;
268 scoped_refptr<WebDataService> web_data_service_; 265 scoped_refptr<WebDataService> web_data_service_;
269 scoped_refptr<PasswordStore> password_store_; 266 scoped_refptr<PasswordStore> password_store_;
270 scoped_refptr<WebKitContext> webkit_context_; 267 scoped_refptr<WebKitContext> webkit_context_;
271 scoped_refptr<fileapi::FileSystemContext> file_system_context_; 268 scoped_refptr<fileapi::FileSystemContext> file_system_context_;
272 scoped_refptr<quota::QuotaManager> quota_manager_; 269 scoped_refptr<quota::QuotaManager> quota_manager_;
273 bool profile_sync_service_created_;
274 bool history_service_created_; 270 bool history_service_created_;
275 bool favicon_service_created_; 271 bool favicon_service_created_;
276 bool created_web_data_service_; 272 bool created_web_data_service_;
277 bool created_password_store_; 273 bool created_password_store_;
278 bool clear_local_state_on_exit_; 274 bool clear_local_state_on_exit_;
279 // Whether or not the last session exited cleanly. This is set only once. 275 // Whether or not the last session exited cleanly. This is set only once.
280 bool last_session_exited_cleanly_; 276 bool last_session_exited_cleanly_;
281 277
282 base::OneShotTimer<ProfileImpl> create_session_service_timer_; 278 base::OneShotTimer<ProfileImpl> create_session_service_timer_;
283 279
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 Profile::Delegate* delegate_; 331 Profile::Delegate* delegate_;
336 332
337 chrome_browser_net::Predictor* predictor_; 333 chrome_browser_net::Predictor* predictor_;
338 334
339 bool session_restore_enabled_; 335 bool session_restore_enabled_;
340 336
341 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); 337 DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
342 }; 338 };
343 339
344 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 340 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698