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

Unified Diff: chrome/browser/profiles/profile_io_data.h

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_io_data.h
===================================================================
--- chrome/browser/profiles/profile_io_data.h (revision 121250)
+++ chrome/browser/profiles/profile_io_data.h (working copy)
@@ -72,6 +72,8 @@
public:
virtual ~ProfileIOData();
+ static ProfileIOData* FromResourceContext(content::ResourceContext* rc);
+
// Returns true if |scheme| is handled in Chrome, or by default handlers in
// net::URLRequest.
static bool IsHandledProtocol(const std::string& scheme);
@@ -81,7 +83,7 @@
static bool IsHandledURL(const GURL& url);
// Called by Profile.
- const content::ResourceContext& GetResourceContext() const;
+ content::ResourceContext* GetResourceContext() const;
ChromeURLDataManagerBackend* GetChromeURLDataManagerBackend() const;
// These should only be called at most once each. Ownership is reversed when
@@ -221,13 +223,40 @@
private:
class ResourceContext : public content::ResourceContext {
public:
- explicit ResourceContext(const ProfileIOData* io_data);
+ explicit ResourceContext(ProfileIOData* io_data);
virtual ~ResourceContext();
private:
- virtual void EnsureInitialized() const OVERRIDE;
+ friend class ProfileIOData;
- const ProfileIOData* const io_data_;
+ // ResourceContext implementation:
+ virtual net::HostResolver* GetHostResolver() OVERRIDE;
+ virtual net::URLRequestContext* GetRequestContext() OVERRIDE;
+ virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE;
+ virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE;
+ virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE;
+ virtual ChromeBlobStorageContext* GetBlobStorageContext() OVERRIDE;
+ virtual quota::QuotaManager* GetQuotaManager() OVERRIDE;
+ virtual content::HostZoomMap* GetHostZoomMap() OVERRIDE;
+ virtual MediaObserver* GetMediaObserver() OVERRIDE;
+ virtual media_stream::MediaStreamManager* GetMediaStreamManager() OVERRIDE;
+ virtual AudioManager* GetAudioManager() OVERRIDE;
+
+ void EnsureInitialized();
+
+ ProfileIOData* const io_data_;
+
+ net::HostResolver* host_resolver_;
+ net::URLRequestContext* request_context_;
+ ChromeAppCacheService* appcache_service_;
+ webkit_database::DatabaseTracker* database_tracker_;
+ fileapi::FileSystemContext* file_system_context_;
+ ChromeBlobStorageContext* blob_storage_context_;
+ quota::QuotaManager* quota_manager_;
+ content::HostZoomMap* host_zoom_map_;
+ MediaObserver* media_observer_;
+ media_stream::MediaStreamManager* media_stream_manager_;
+ AudioManager* audio_manager_;
};
typedef base::hash_map<std::string, scoped_refptr<ChromeURLRequestContext> >
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698