Chromium Code Reviews| Index: chrome/browser/profiles/profile.h |
| diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h |
| index f02e925c59d1014f3eed93bb589cd7da7640f41a..8ff514456fbdff13b43d6ac4a03a8bc7eba84146 100644 |
| --- a/chrome/browser/profiles/profile.h |
| +++ b/chrome/browser/profiles/profile.h |
| @@ -14,6 +14,7 @@ |
| #include "base/logging.h" |
| #include "chrome/browser/net/preconnect.h" // TODO: remove this. |
| #include "chrome/common/extensions/extension.h" |
| +#include "content/browser/browser_context.h" |
| namespace base { |
| class Time; |
| @@ -28,10 +29,6 @@ class LibCrosServiceLibraryImpl; |
| class ResetDefaultProxyConfigServiceTask; |
| } |
| -namespace content { |
| -class ResourceContext; |
| -} |
| - |
| namespace fileapi { |
| class FileSystemContext; |
| class SandboxedFileSystemContext; |
| @@ -51,10 +48,6 @@ namespace prerender { |
| class PrerenderManager; |
| } |
| -namespace quota { |
| -class QuotaManager; |
| -} |
| - |
| namespace speech_input { |
| class SpeechRecognizer; |
| } |
| @@ -67,10 +60,8 @@ class AutocompleteClassifier; |
| class BookmarkModel; |
| class BrowserSignin; |
| class ChromeAppCacheService; |
| -class ChromeBlobStorageContext; |
| class ChromeURLDataManager; |
| class CloudPrintProxyService; |
| -class DownloadManager; |
| class Extension; |
| class ExtensionDevToolsManager; |
| class ExtensionEventRouter; |
| @@ -81,13 +72,9 @@ class ExtensionProcessManager; |
| class ExtensionService; |
| class ExtensionSpecialStoragePolicy; |
| class FaviconService; |
| -class FilePath; |
| class FindBarState; |
| -class GeolocationContentSettingsMap; |
| -class GeolocationPermissionContext; |
| class HistoryService; |
| class HostContentSettingsMap; |
| -class HostZoomMap; |
| class NavigationController; |
| class PasswordStore; |
| class PersonalDataManager; |
| @@ -99,7 +86,6 @@ class PromoCounter; |
| class ProtocolHandlerRegistry; |
| class SQLitePersistentCookieStore; |
| class SSLConfigServiceManager; |
| -class SSLHostState; |
| class SpellCheckHost; |
| class TemplateURLFetcher; |
| class TokenService; |
| @@ -109,13 +95,8 @@ class UserStyleSheetWatcher; |
| class VisitedLinkEventListener; |
| class VisitedLinkMaster; |
| class WebDataService; |
| -class WebKitContext; |
| class PromoResourceService; |
| -namespace net { |
| -class URLRequestContextGetter; |
| -} |
| - |
| #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) |
| // Local profile ids are used to associate resources stored outside the profile |
| // directory, like saved passwords in GNOME Keyring / KWallet, with a profile. |
| @@ -124,7 +105,7 @@ class URLRequestContextGetter; |
| typedef int LocalProfileId; |
| #endif |
| -class Profile { |
| +class Profile : public content::BrowserContext { |
| public: |
| // Profile services are accessed with the following parameter. This parameter |
| // defines what the caller plans to do with the service. |
| @@ -211,13 +192,31 @@ class Profile { |
| static Profile* CreateProfileAsync(const FilePath& path, |
| Delegate* delegate); |
| + // Begin BrowserContext ------------------------------------------------------ |
|
jam
2011/07/21 16:41:54
nit: I haven't this style of comments before, usua
|
| + |
| + virtual FilePath GetPath() = 0; |
| + virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; |
| + virtual SSLHostState* GetSSLHostState() = 0; |
| + virtual DownloadManager* GetDownloadManager() = 0; |
| + virtual bool HasCreatedDownloadManager() const = 0; |
| + virtual quota::QuotaManager* GetQuotaManager() = 0; |
| + virtual net::URLRequestContextGetter* GetRequestContext() = 0; |
| + virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
| + int renderer_child_id) = 0; |
| + virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0; |
| + virtual const content::ResourceContext& GetResourceContext() = 0; |
| + virtual HostZoomMap* GetHostZoomMap() = 0; |
| + virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap() = 0; |
| + virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; |
| + virtual WebKitContext* GetWebKitContext() = 0; |
| + virtual ChromeBlobStorageContext* GetBlobStorageContext() = 0; |
| + |
| + // End BrowserContext -------------------------------------------------------- |
| + |
| // Returns the name associated with this profile. This name is displayed in |
| // the browser frame. |
| virtual std::string GetProfileName() = 0; |
| - // Returns the path of the directory where this profile's data is stored. |
| - virtual FilePath GetPath() = 0; |
| - |
| // Return whether this profile is incognito. Default is false. |
| virtual bool IsOffTheRecord() = 0; |
| @@ -239,9 +238,6 @@ class Profile { |
| // Returns a pointer to the ChromeAppCacheService instance for this profile. |
| virtual ChromeAppCacheService* GetAppCacheService() = 0; |
| - // Returns a pointer to the DatabaseTracker instance for this profile. |
| - virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; |
| - |
| // Returns a pointer to the TopSites (thumbnail manager) instance |
| // for this profile. |
| virtual history::TopSites* GetTopSites() = 0; |
| @@ -282,11 +278,6 @@ class Profile { |
| virtual ExtensionSpecialStoragePolicy* |
| GetExtensionSpecialStoragePolicy() = 0; |
| - // Retrieves a pointer to the SSLHostState associated with this profile. |
| - // The SSLHostState is lazily created the first time that this method is |
| - // called. |
| - virtual SSLHostState* GetSSLHostState() = 0; |
| - |
| // Retrieves a pointer to the TransportSecurityState associated with |
| // this profile. The TransportSecurityState is lazily created the |
| // first time that this method is called. |
| @@ -358,10 +349,6 @@ class Profile { |
| // profile. |
| virtual TemplateURLFetcher* GetTemplateURLFetcher() = 0; |
| - // Returns the DownloadManager associated with this profile. |
| - virtual DownloadManager* GetDownloadManager() = 0; |
| - virtual bool HasCreatedDownloadManager() const = 0; |
| - |
| // Returns the PersonalDataManager associated with this profile. |
| virtual PersonalDataManager* GetPersonalDataManager() = 0; |
| @@ -370,29 +357,9 @@ class Profile { |
| // by the profile. |
| virtual fileapi::FileSystemContext* GetFileSystemContext() = 0; |
| - virtual quota::QuotaManager* GetQuotaManager() = 0; |
| - |
| // Returns the BrowserSignin object assigned to this profile. |
| virtual BrowserSignin* GetBrowserSignin() = 0; |
| - // Returns the request context information associated with this profile. Call |
| - // this only on the UI thread, since it can send notifications that should |
| - // happen on the UI thread. |
| - virtual net::URLRequestContextGetter* GetRequestContext() = 0; |
| - |
| - // Returns the request context appropriate for the given renderer. If the |
| - // renderer process doesn't have an assosicated installed app, or if the |
| - // installed app's is_storage_isolated() returns false, this is equivalent to |
| - // calling GetRequestContext(). |
| - // TODO(creis): After isolated app storage is no longer an experimental |
| - // feature, consider making this the default contract for GetRequestContext. |
| - virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
| - int renderer_child_id) = 0; |
| - |
| - // Returns the request context for media resources asociated with this |
| - // profile. |
| - virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0; |
| - |
| // Returns the request context used for extension-related requests. This |
| // is only used for a separate cookie store currently. |
| virtual net::URLRequestContextGetter* GetRequestContextForExtensions() = 0; |
| @@ -402,8 +369,6 @@ class Profile { |
| virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp( |
| const std::string& app_id) = 0; |
| - virtual const content::ResourceContext& GetResourceContext() = 0; |
| - |
| // Called by the ExtensionService that lives in this profile. Gives the |
| // profile a chance to react to the load event before the EXTENSION_LOADED |
| // notification has fired. The purpose for handling this event first is to |
| @@ -425,15 +390,6 @@ class Profile { |
| // Returns the Hostname <-> Content settings map for this profile. |
| virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0; |
| - // Returns the Hostname <-> Zoom Level map for this profile. |
| - virtual HostZoomMap* GetHostZoomMap() = 0; |
| - |
| - // Returns the geolocation settings map for this profile. |
| - virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap() = 0; |
| - |
| - // Returns the geolocation permission context for this profile. |
| - virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; |
| - |
| // Returns the user style sheet watcher. |
| virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() = 0; |
| @@ -487,9 +443,6 @@ class Profile { |
| // current spellchecker and replace it with a new one. |
| virtual void ReinitializeSpellCheckHost(bool force) = 0; |
| - // Returns the WebKitContext assigned to this profile. |
| - virtual WebKitContext* GetWebKitContext() = 0; |
| - |
| // Marks the profile as cleanly shutdown. |
| // |
| // NOTE: this is invoked internally on a normal shutdown, but is public so |
| @@ -512,10 +465,6 @@ class Profile { |
| virtual FilePath last_selected_directory() = 0; |
| virtual void set_last_selected_directory(const FilePath& path) = 0; |
| - // Returns a pointer to the ChromeBlobStorageContext instance for this |
| - // profile. |
| - virtual ChromeBlobStorageContext* GetBlobStorageContext() = 0; |
| - |
| // Returns the IO-thread-accessible profile data for this profile. |
| virtual ExtensionInfoMap* GetExtensionInfoMap() = 0; |