OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/browser/loader/resource_message_filter.h" | 5 #include "content/browser/loader/resource_message_filter.h" |
6 | 6 |
7 #include "content/browser/appcache/chrome_appcache_service.h" | 7 #include "content/browser/appcache/chrome_appcache_service.h" |
8 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 8 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
9 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 9 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
10 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 10 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 ResourceMessageFilter::~ResourceMessageFilter() { | 36 ResourceMessageFilter::~ResourceMessageFilter() { |
37 } | 37 } |
38 | 38 |
39 void ResourceMessageFilter::OnChannelClosing() { | 39 void ResourceMessageFilter::OnChannelClosing() { |
40 // Unhook us from all pending network requests so they don't get sent to a | 40 // Unhook us from all pending network requests so they don't get sent to a |
41 // deleted object. | 41 // deleted object. |
42 ResourceDispatcherHostImpl::Get()->CancelRequestsForProcess(child_id_); | 42 ResourceDispatcherHostImpl::Get()->CancelRequestsForProcess(child_id_); |
43 } | 43 } |
44 | 44 |
45 bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& message, | 45 bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& message) { |
46 bool* message_was_ok) { | 46 return ResourceDispatcherHostImpl::Get()->OnMessageReceived(message, this); |
47 return ResourceDispatcherHostImpl::Get()->OnMessageReceived( | |
48 message, this, message_was_ok); | |
49 } | 47 } |
50 | 48 |
51 void ResourceMessageFilter::GetContexts( | 49 void ResourceMessageFilter::GetContexts( |
52 const ResourceHostMsg_Request& request, | 50 const ResourceHostMsg_Request& request, |
53 ResourceContext** resource_context, | 51 ResourceContext** resource_context, |
54 net::URLRequestContext** request_context) { | 52 net::URLRequestContext** request_context) { |
55 return get_contexts_callback_.Run(request, resource_context, request_context); | 53 return get_contexts_callback_.Run(request, resource_context, request_context); |
56 } | 54 } |
57 | 55 |
58 base::WeakPtr<ResourceMessageFilter> ResourceMessageFilter::GetWeakPtr() { | 56 base::WeakPtr<ResourceMessageFilter> ResourceMessageFilter::GetWeakPtr() { |
59 return weak_ptr_factory_.GetWeakPtr(); | 57 return weak_ptr_factory_.GetWeakPtr(); |
60 } | 58 } |
61 | 59 |
62 } // namespace content | 60 } // namespace content |
OLD | NEW |