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

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

Issue 7989001: Remove use of default request context and fix use of speech censor flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Separate overriden methods in profile_impl.h Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/timer.h" 14 #include "base/timer.h"
15 #include "chrome/browser/prefs/pref_change_registrar.h" 15 #include "chrome/browser/prefs/pref_change_registrar.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/profiles/profile_impl_io_data.h" 17 #include "chrome/browser/profiles/profile_impl_io_data.h"
18 #include "content/common/notification_observer.h" 18 #include "content/common/notification_observer.h"
19 #include "content/common/notification_registrar.h" 19 #include "content/common/notification_registrar.h"
20 20
21 class ChromeDownloadManagerDelegate; 21 class ChromeDownloadManagerDelegate;
22 class ExtensionNavigationObserver; 22 class ExtensionNavigationObserver;
23 class ExtensionPrefs; 23 class ExtensionPrefs;
24 class ExtensionPrefValueMap; 24 class ExtensionPrefValueMap;
25 class ExtensionSettings; 25 class ExtensionSettings;
26 class NetPrefObserver; 26 class NetPrefObserver;
27 class PrefService; 27 class PrefService;
28 class SpeechInputPreferences;
28 class SpellCheckProfile; 29 class SpellCheckProfile;
29 30
30 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
31 namespace chromeos { 32 namespace chromeos {
32 class EnterpriseExtensionObserver; 33 class EnterpriseExtensionObserver;
33 class LocaleChangeGuard; 34 class LocaleChangeGuard;
34 class Preferences; 35 class Preferences;
35 } 36 }
36 #endif 37 #endif
37 38
38 // The default profile implementation. 39 // The default profile implementation.
39 class ProfileImpl : public Profile, 40 class ProfileImpl : public Profile,
40 public NotificationObserver { 41 public NotificationObserver {
41 public: 42 public:
42 virtual ~ProfileImpl(); 43 virtual ~ProfileImpl();
43 44
44 static void RegisterUserPrefs(PrefService* prefs); 45 static void RegisterUserPrefs(PrefService* prefs);
45 46
46 // Profile implementation. 47 // content::BrowserContext implementation:
47 virtual std::string GetProfileName(); 48 virtual FilePath GetPath() OVERRIDE;
48 virtual FilePath GetPath(); 49 virtual SSLHostState* GetSSLHostState() OVERRIDE;
49 virtual bool IsOffTheRecord(); 50 virtual DownloadManager* GetDownloadManager() OVERRIDE;
50 virtual Profile* GetOffTheRecordProfile(); 51 virtual bool HasCreatedDownloadManager() const OVERRIDE;
51 virtual void DestroyOffTheRecordProfile(); 52 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
52 virtual bool HasOffTheRecordProfile();
53 virtual Profile* GetOriginalProfile();
54 virtual ChromeAppCacheService* GetAppCacheService();
55 virtual webkit_database::DatabaseTracker* GetDatabaseTracker();
56 virtual history::TopSites* GetTopSites();
57 virtual history::TopSites* GetTopSitesWithoutCreating();
58 virtual VisitedLinkMaster* GetVisitedLinkMaster();
59 virtual UserScriptMaster* GetUserScriptMaster();
60 virtual SSLHostState* GetSSLHostState();
61 virtual ExtensionService* GetExtensionService();
62 virtual ExtensionDevToolsManager* GetExtensionDevToolsManager();
63 virtual ExtensionProcessManager* GetExtensionProcessManager();
64 virtual ExtensionMessageService* GetExtensionMessageService();
65 virtual ExtensionEventRouter* GetExtensionEventRouter();
66 virtual ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy();
67 virtual FaviconService* GetFaviconService(ServiceAccessType sat);
68 virtual HistoryService* GetHistoryService(ServiceAccessType sat);
69 virtual HistoryService* GetHistoryServiceWithoutCreating();
70 virtual AutocompleteClassifier* GetAutocompleteClassifier();
71 virtual history::ShortcutsBackend* GetShortcutsBackend();
72 virtual WebDataService* GetWebDataService(ServiceAccessType sat);
73 virtual WebDataService* GetWebDataServiceWithoutCreating();
74 virtual PasswordStore* GetPasswordStore(ServiceAccessType sat);
75 virtual PrefService* GetPrefs();
76 virtual PrefService* GetOffTheRecordPrefs();
77 virtual TemplateURLFetcher* GetTemplateURLFetcher();
78 virtual DownloadManager* GetDownloadManager();
79 virtual fileapi::FileSystemContext* GetFileSystemContext();
80 virtual quota::QuotaManager* GetQuotaManager();
81 virtual bool HasCreatedDownloadManager() const;
82 virtual net::URLRequestContextGetter* GetRequestContext();
83 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 53 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
84 int renderer_child_id); 54 int renderer_child_id) OVERRIDE;
85 virtual net::URLRequestContextGetter* GetRequestContextForMedia(); 55 virtual net::URLRequestContextGetter* GetRequestContextForMedia() OVERRIDE;
86 virtual net::URLRequestContextGetter* GetRequestContextForExtensions(); 56 virtual const content::ResourceContext& GetResourceContext() OVERRIDE;
57 virtual HostZoomMap* GetHostZoomMap() OVERRIDE;
58 virtual GeolocationPermissionContext*
59 GetGeolocationPermissionContext() OVERRIDE;
60 virtual SpeechInputPreferences* GetSpeechInputPreferences() OVERRIDE;
61 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE;
62 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE;
63 virtual WebKitContext* GetWebKitContext() OVERRIDE;
64 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE;
65 virtual ChromeBlobStorageContext* GetBlobStorageContext() OVERRIDE;
66 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE;
67
68 // Profile implementation:
69 virtual std::string GetProfileName() OVERRIDE;
70 virtual bool IsOffTheRecord() OVERRIDE;
71 virtual Profile* GetOffTheRecordProfile() OVERRIDE;
72 virtual void DestroyOffTheRecordProfile() OVERRIDE;
73 virtual bool HasOffTheRecordProfile() OVERRIDE;
74 virtual Profile* GetOriginalProfile() OVERRIDE;
75 virtual history::TopSites* GetTopSites() OVERRIDE;
76 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE;
77 virtual VisitedLinkMaster* GetVisitedLinkMaster() OVERRIDE;
78 virtual UserScriptMaster* GetUserScriptMaster() OVERRIDE;
79 virtual ExtensionService* GetExtensionService() OVERRIDE;
80 virtual ExtensionDevToolsManager* GetExtensionDevToolsManager() OVERRIDE;
81 virtual ExtensionProcessManager* GetExtensionProcessManager() OVERRIDE;
82 virtual ExtensionMessageService* GetExtensionMessageService() OVERRIDE;
83 virtual ExtensionEventRouter* GetExtensionEventRouter() OVERRIDE;
84 virtual ExtensionSpecialStoragePolicy*
85 GetExtensionSpecialStoragePolicy() OVERRIDE;
86 virtual FaviconService* GetFaviconService(ServiceAccessType sat) OVERRIDE;
87 virtual HistoryService* GetHistoryService(ServiceAccessType sat) OVERRIDE;
88 virtual HistoryService* GetHistoryServiceWithoutCreating() OVERRIDE;
89 virtual AutocompleteClassifier* GetAutocompleteClassifier() OVERRIDE;
90 virtual history::ShortcutsBackend* GetShortcutsBackend() OVERRIDE;
91 virtual WebDataService* GetWebDataService(ServiceAccessType sat) OVERRIDE;
92 virtual WebDataService* GetWebDataServiceWithoutCreating() OVERRIDE;
93 virtual PasswordStore* GetPasswordStore(ServiceAccessType sat) OVERRIDE;
94 virtual PrefService* GetPrefs() OVERRIDE;
95 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE;
96 virtual TemplateURLFetcher* GetTemplateURLFetcher() OVERRIDE;
97 virtual net::URLRequestContextGetter*
98 GetRequestContextForExtensions() OVERRIDE;
87 virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp( 99 virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp(
88 const std::string& app_id); 100 const std::string& app_id) OVERRIDE;
89 virtual const content::ResourceContext& GetResourceContext(); 101 virtual void RegisterExtensionWithRequestContexts(
90 virtual void RegisterExtensionWithRequestContexts(const Extension* extension); 102 const Extension* extension) OVERRIDE;
91 virtual void UnregisterExtensionWithRequestContexts( 103 virtual void UnregisterExtensionWithRequestContexts(
92 const std::string& extension_id, 104 const std::string& extension_id,
93 const extension_misc::UnloadedExtensionReason reason); 105 const extension_misc::UnloadedExtensionReason reason) OVERRIDE;
94 virtual net::SSLConfigService* GetSSLConfigService(); 106 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE;
95 virtual HostContentSettingsMap* GetHostContentSettingsMap(); 107 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE;
96 virtual HostZoomMap* GetHostZoomMap(); 108 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() OVERRIDE;
97 virtual GeolocationPermissionContext* GetGeolocationPermissionContext(); 109 virtual FindBarState* GetFindBarState() OVERRIDE;
98 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher(); 110 virtual bool HasProfileSyncService() const OVERRIDE;
99 virtual FindBarState* GetFindBarState(); 111 virtual bool DidLastSessionExitCleanly() OVERRIDE;
100 virtual bool HasProfileSyncService() const; 112 virtual BookmarkModel* GetBookmarkModel() OVERRIDE;
101 virtual bool DidLastSessionExitCleanly(); 113 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE;
102 virtual BookmarkModel* GetBookmarkModel(); 114 virtual bool IsSameProfile(Profile* profile) OVERRIDE;
103 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); 115 virtual base::Time GetStartTime() const OVERRIDE;
104 virtual bool IsSameProfile(Profile* profile); 116 virtual SpellCheckHost* GetSpellCheckHost() OVERRIDE;
105 virtual base::Time GetStartTime() const; 117 virtual void ReinitializeSpellCheckHost(bool force) OVERRIDE;
106 virtual SpellCheckHost* GetSpellCheckHost(); 118 virtual void MarkAsCleanShutdown() OVERRIDE;
107 virtual void ReinitializeSpellCheckHost(bool force); 119 virtual void InitExtensions(bool extensions_enabled) OVERRIDE;
108 virtual WebKitContext* GetWebKitContext(); 120 virtual void InitPromoResources() OVERRIDE;
109 virtual void MarkAsCleanShutdown(); 121 virtual void InitRegisteredProtocolHandlers() OVERRIDE;
110 virtual void InitExtensions(bool extensions_enabled); 122 virtual FilePath last_selected_directory() OVERRIDE;
111 virtual void InitPromoResources(); 123 virtual void set_last_selected_directory(const FilePath& path) OVERRIDE;
112 virtual void InitRegisteredProtocolHandlers(); 124 virtual ProfileSyncService* GetProfileSyncService() OVERRIDE;
113 virtual FilePath last_selected_directory();
114 virtual void set_last_selected_directory(const FilePath& path);
115 virtual ProfileSyncService* GetProfileSyncService();
116 virtual ProfileSyncService* GetProfileSyncService( 125 virtual ProfileSyncService* GetProfileSyncService(
117 const std::string& cros_user); 126 const std::string& cros_user) OVERRIDE;
118 virtual TokenService* GetTokenService(); 127 virtual TokenService* GetTokenService() OVERRIDE;
119 void InitSyncService(const std::string& cros_user); 128 void InitSyncService(const std::string& cros_user);
120 virtual ChromeBlobStorageContext* GetBlobStorageContext(); 129 virtual ExtensionInfoMap* GetExtensionInfoMap() OVERRIDE;
121 virtual ExtensionInfoMap* GetExtensionInfoMap(); 130 virtual PromoCounter* GetInstantPromoCounter() OVERRIDE;
122 virtual PromoCounter* GetInstantPromoCounter(); 131 virtual ChromeURLDataManager* GetChromeURLDataManager() OVERRIDE;
123 virtual ChromeURLDataManager* GetChromeURLDataManager(); 132 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE;
124 virtual chrome_browser_net::Predictor* GetNetworkPredictor(); 133 virtual void DeleteTransportSecurityStateSince(base::Time time) OVERRIDE;
125 virtual void DeleteTransportSecurityStateSince(base::Time time);
126 134
127 #if defined(OS_CHROMEOS) 135 #if defined(OS_CHROMEOS)
128 virtual void ChangeAppLocale(const std::string& locale, AppLocaleChangedVia); 136 virtual void ChangeAppLocale(const std::string& locale,
129 virtual void OnLogin(); 137 AppLocaleChangedVia) OVERRIDE;
130 virtual void SetupChromeOSEnterpriseExtensionObserver(); 138 virtual void OnLogin() OVERRIDE;
131 virtual void InitChromeOSPreferences(); 139 virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE;
140 virtual void InitChromeOSPreferences() OVERRIDE;
132 #endif // defined(OS_CHROMEOS) 141 #endif // defined(OS_CHROMEOS)
133 142
134 virtual PrefProxyConfigTracker* GetProxyConfigTracker(); 143 virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE;
135 virtual prerender::PrerenderManager* GetPrerenderManager(); 144 virtual prerender::PrerenderManager* GetPrerenderManager() OVERRIDE;
136 145
137 // NotificationObserver implementation. 146 // NotificationObserver implementation.
138 virtual void Observe(int type, 147 virtual void Observe(int type,
139 const NotificationSource& source, 148 const NotificationSource& source,
140 const NotificationDetails& details); 149 const NotificationDetails& details) OVERRIDE;
141 150
142 private: 151 private:
143 friend class Profile; 152 friend class Profile;
144 153
145 ProfileImpl(const FilePath& path, 154 ProfileImpl(const FilePath& path,
146 Profile::Delegate* delegate); 155 Profile::Delegate* delegate);
147 156
148 // Does final initialization. Should be called after prefs were loaded. 157 // Does final initialization. Should be called after prefs were loaded.
149 void DoFinalInit(); 158 void DoFinalInit();
150 159
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 scoped_ptr<ProfileSyncService> sync_service_; 226 scoped_ptr<ProfileSyncService> sync_service_;
218 227
219 ProfileImplIOData::Handle io_data_; 228 ProfileImplIOData::Handle io_data_;
220 229
221 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; 230 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
222 231
223 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 232 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
224 scoped_refptr<HostZoomMap> host_zoom_map_; 233 scoped_refptr<HostZoomMap> host_zoom_map_;
225 scoped_refptr<GeolocationPermissionContext> 234 scoped_refptr<GeolocationPermissionContext>
226 geolocation_permission_context_; 235 geolocation_permission_context_;
236 scoped_refptr<SpeechInputPreferences> speech_input_preferences_;
227 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; 237 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_;
228 scoped_ptr<FindBarState> find_bar_state_; 238 scoped_ptr<FindBarState> find_bar_state_;
229 scoped_refptr<ChromeDownloadManagerDelegate> download_manager_delegate_; 239 scoped_refptr<ChromeDownloadManagerDelegate> download_manager_delegate_;
230 scoped_refptr<DownloadManager> download_manager_; 240 scoped_refptr<DownloadManager> download_manager_;
231 scoped_refptr<HistoryService> history_service_; 241 scoped_refptr<HistoryService> history_service_;
232 scoped_ptr<FaviconService> favicon_service_; 242 scoped_ptr<FaviconService> favicon_service_;
233 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; 243 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_;
234 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; 244 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_;
235 scoped_refptr<WebDataService> web_data_service_; 245 scoped_refptr<WebDataService> web_data_service_;
236 scoped_refptr<PasswordStore> password_store_; 246 scoped_refptr<PasswordStore> password_store_;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; 298 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_;
289 299
290 Profile::Delegate* delegate_; 300 Profile::Delegate* delegate_;
291 301
292 chrome_browser_net::Predictor* predictor_; 302 chrome_browser_net::Predictor* predictor_;
293 303
294 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); 304 DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
295 }; 305 };
296 306
297 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 307 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698