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

Side by Side Diff: content/browser/resource_context.h

Issue 7847027: DownloadId (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merge Created 9 years, 3 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) 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 #ifndef CONTENT_BROWSER_RESOURCE_CONTEXT_H_ 5 #ifndef CONTENT_BROWSER_RESOURCE_CONTEXT_H_
6 #define CONTENT_BROWSER_RESOURCE_CONTEXT_H_ 6 #define CONTENT_BROWSER_RESOURCE_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/browser/download/download_manager.h"
14 15
15 class ChromeAppCacheService; 16 class ChromeAppCacheService;
16 class ChromeBlobStorageContext; 17 class ChromeBlobStorageContext;
17 class ExtensionInfoMap; 18 class ExtensionInfoMap;
18 class HostZoomMap; 19 class HostZoomMap;
19 class MediaObserver; 20 class MediaObserver;
20 namespace fileapi { 21 namespace fileapi {
21 class FileSystemContext; 22 class FileSystemContext;
22 } // namespace fileapi 23 } // namespace fileapi
23 namespace net { 24 namespace net {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 70
70 quota::QuotaManager* quota_manager() const; 71 quota::QuotaManager* quota_manager() const;
71 void set_quota_manager(quota::QuotaManager* quota_manager); 72 void set_quota_manager(quota::QuotaManager* quota_manager);
72 73
73 HostZoomMap* host_zoom_map() const; 74 HostZoomMap* host_zoom_map() const;
74 void set_host_zoom_map(HostZoomMap* host_zoom_map); 75 void set_host_zoom_map(HostZoomMap* host_zoom_map);
75 76
76 MediaObserver* media_observer() const; 77 MediaObserver* media_observer() const;
77 void set_media_observer(MediaObserver* media_observer); 78 void set_media_observer(MediaObserver* media_observer);
78 79
80 // TODO(benjhayden): Promote GetNextIdThunkType to a separate object.
81 const DownloadManager::GetNextIdThunkType& next_download_id_thunk() const;
82 void set_next_download_id_thunk(
83 const DownloadManager::GetNextIdThunkType& thunk);
84
79 // ======================================================================= 85 // =======================================================================
80 // TODO(willchan): These don't belong in content/. Remove them eventually. 86 // TODO(willchan): These don't belong in content/. Remove them eventually.
81 87
82 // TODO(cbentzel): Kill this one. 88 // TODO(cbentzel): Kill this one.
83 const base::Callback<prerender::PrerenderManager*(void)>& 89 const base::Callback<prerender::PrerenderManager*(void)>&
84 prerender_manager_getter() const; 90 prerender_manager_getter() const;
85 void set_prerender_manager_getter( 91 void set_prerender_manager_getter(
86 const base::Callback<prerender::PrerenderManager*(void)>& 92 const base::Callback<prerender::PrerenderManager*(void)>&
87 prerender_manager_getter); 93 prerender_manager_getter);
88 94
89 protected: 95 protected:
90 ResourceContext(); 96 ResourceContext();
91 97
92 private: 98 private:
93 virtual void EnsureInitialized() const = 0; 99 virtual void EnsureInitialized() const = 0;
94 100
95 net::HostResolver* host_resolver_; 101 net::HostResolver* host_resolver_;
96 net::URLRequestContext* request_context_; 102 net::URLRequestContext* request_context_;
97 ChromeAppCacheService* appcache_service_; 103 ChromeAppCacheService* appcache_service_;
98 webkit_database::DatabaseTracker* database_tracker_; 104 webkit_database::DatabaseTracker* database_tracker_;
99 fileapi::FileSystemContext* file_system_context_; 105 fileapi::FileSystemContext* file_system_context_;
100 ChromeBlobStorageContext* blob_storage_context_; 106 ChromeBlobStorageContext* blob_storage_context_;
101 quota::QuotaManager* quota_manager_; 107 quota::QuotaManager* quota_manager_;
102 HostZoomMap* host_zoom_map_; 108 HostZoomMap* host_zoom_map_;
103 MediaObserver* media_observer_; 109 MediaObserver* media_observer_;
110 DownloadManager::GetNextIdThunkType next_download_id_thunk_;
104 111
105 // Externally-defined data accessible by key. 112 // Externally-defined data accessible by key.
106 typedef std::map<const void*, void*> UserDataMap; 113 typedef std::map<const void*, void*> UserDataMap;
107 UserDataMap user_data_; 114 UserDataMap user_data_;
108 115
109 116
110 // ======================================================================= 117 // =======================================================================
111 // TODO(willchan): These don't belong in content/. Remove them eventually. 118 // TODO(willchan): These don't belong in content/. Remove them eventually.
112 119
113 base::Callback<prerender::PrerenderManager*(void)> prerender_manager_getter_; 120 base::Callback<prerender::PrerenderManager*(void)> prerender_manager_getter_;
114 121
115 DISALLOW_COPY_AND_ASSIGN(ResourceContext); 122 DISALLOW_COPY_AND_ASSIGN(ResourceContext);
116 }; 123 };
117 124
118 } // namespace content 125 } // namespace content
119 126
120 #endif // CONTENT_BROWSER_RESOURCE_CONTEXT_H_ 127 #endif // CONTENT_BROWSER_RESOURCE_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host_unittest.cc ('k') | content/browser/resource_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698