Index: content/browser/loader/resource_message_filter.h |
diff --git a/content/browser/loader/resource_message_filter.h b/content/browser/loader/resource_message_filter.h |
index bcc07138851c51c5c92be8f5e46738ff5e55150c..22f7c10a0336e3c39a3ae08d716fd55a1e5c56b3 100644 |
--- a/content/browser/loader/resource_message_filter.h |
+++ b/content/browser/loader/resource_message_filter.h |
@@ -31,6 +31,7 @@ namespace content { |
class ChromeAppCacheService; |
class ChromeBlobStorageContext; |
class ResourceContext; |
+class ResourceRequesterInfo; |
class ServiceWorkerContextWrapper; |
// This class filters out incoming IPC messages for network requests and |
@@ -53,7 +54,6 @@ class CONTENT_EXPORT ResourceMessageFilter |
// (and may be invalid) for requests that are NOT from the NPAPI plugin |
// process. |
kinuko
2016/11/18 01:29:21
Now that we're making it very explicit that this c
horo
2016/11/18 02:02:51
Done.
|
ResourceMessageFilter(int child_id, |
- int process_type, |
ChromeAppCacheService* appcache_service, |
ChromeBlobStorageContext* blob_storage_context, |
storage::FileSystemContext* file_system_context, |
@@ -61,36 +61,11 @@ class CONTENT_EXPORT ResourceMessageFilter |
const GetContextsCallback& get_contexts_callback); |
// BrowserMessageFilter implementation. |
+ void OnFilterAdded(IPC::Channel* channel) override; |
void OnChannelClosing() override; |
bool OnMessageReceived(const IPC::Message& message) override; |
void OnDestruct() const override; |
- void GetContexts(ResourceType resource_type, |
- ResourceContext** resource_context, |
- net::URLRequestContext** request_context); |
- |
- // Returns the net::URLRequestContext for the given request. |
- net::URLRequestContext* GetURLRequestContext(ResourceType request_type); |
- |
- ChromeAppCacheService* appcache_service() const { |
- return appcache_service_.get(); |
- } |
- |
- ChromeBlobStorageContext* blob_storage_context() const { |
- return blob_storage_context_.get(); |
- } |
- |
- storage::FileSystemContext* file_system_context() const { |
- return file_system_context_.get(); |
- } |
- |
- ServiceWorkerContextWrapper* service_worker_context() const { |
- return service_worker_context_.get(); |
- } |
- |
- int child_id() const { return child_id_; } |
- int process_type() const { return process_type_; } |
- |
base::WeakPtr<ResourceMessageFilter> GetWeakPtr(); |
void CreateLoaderAndStart( |
@@ -103,6 +78,7 @@ class CONTENT_EXPORT ResourceMessageFilter |
int32_t request_id, |
const ResourceRequest& request, |
const SyncLoadCallback& callback) override; |
+ int child_id() const; |
protected: |
// Protected destructor so that we can be overriden in tests. |
@@ -111,19 +87,16 @@ class CONTENT_EXPORT ResourceMessageFilter |
private: |
friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; |
friend class base::DeleteHelper<ResourceMessageFilter>; |
+ friend class AsyncResourceHandlerTest; |
+ friend class ResourceDispatcherHostTest; |
+ friend class URLLoaderFactoryImplTest; |
- // The ID of the child process. |
- int child_id_; |
+ const ResourceRequesterInfo* requester_info() const { |
+ return requester_info_.get(); |
+ } |
- int process_type_; |
bool is_channel_closed_; |
- |
- scoped_refptr<ChromeAppCacheService> appcache_service_; |
- scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
- scoped_refptr<storage::FileSystemContext> file_system_context_; |
- scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; |
- |
- GetContextsCallback get_contexts_callback_; |
+ scoped_refptr<ResourceRequesterInfo> requester_info_; |
// This must come last to make sure weak pointers are invalidated first. |
base::WeakPtrFactory<ResourceMessageFilter> weak_ptr_factory_; |