summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/renderer_host')
-rw-r--r--content/browser/renderer_host/browser_render_process_host.cc10
-rw-r--r--content/browser/renderer_host/pepper_message_filter.cc13
-rw-r--r--content/browser/renderer_host/pepper_message_filter.h11
3 files changed, 18 insertions, 16 deletions
diff --git a/content/browser/renderer_host/browser_render_process_host.cc b/content/browser/renderer_host/browser_render_process_host.cc
index b10ce64..cf81afd 100644
--- a/content/browser/renderer_host/browser_render_process_host.cc
+++ b/content/browser/renderer_host/browser_render_process_host.cc
@@ -463,7 +463,7 @@ void BrowserRenderProcessHost::CreateMessageFilters() {
channel_->AddFilter(new AudioInputRendererHost());
channel_->AddFilter(new AudioRendererHost());
channel_->AddFilter(
- new AppCacheDispatcherHost(profile()->GetRequestContext(), id()));
+ new AppCacheDispatcherHost(&profile()->GetResourceContext(), id()));
channel_->AddFilter(new ClipboardMessageFilter());
channel_->AddFilter(
new DOMStorageMessageFilter(id(), profile()->GetWebKitContext(),
@@ -476,9 +476,12 @@ void BrowserRenderProcessHost::CreateMessageFilters() {
id(), profile()->GetGeolocationPermissionContext()));
channel_->AddFilter(new GpuMessageFilter(id()));
channel_->AddFilter(new PepperFileMessageFilter(id(), profile()));
- channel_->AddFilter(new PepperMessageFilter(profile()));
+ channel_->AddFilter(
+ new PepperMessageFilter(&profile()->GetResourceContext()));
channel_->AddFilter(new speech_input::SpeechInputDispatcherHost(id()));
- channel_->AddFilter(new FileSystemDispatcherHost(profile()));
+ channel_->AddFilter(
+ new FileSystemDispatcherHost(&profile()->GetResourceContext(),
+ profile()->GetHostContentSettingsMap()));
channel_->AddFilter(new device_orientation::MessageFilter());
channel_->AddFilter(
new BlobMessageFilter(id(), profile()->GetBlobStorageContext()));
@@ -495,7 +498,6 @@ void BrowserRenderProcessHost::CreateMessageFilters() {
channel_->AddFilter(
new WorkerMessageFilter(
id(),
- profile()->GetRequestContext(),
&profile()->GetResourceContext(),
g_browser_process->resource_dispatcher_host(),
NewCallbackWithReturnValue(
diff --git a/content/browser/renderer_host/pepper_message_filter.cc b/content/browser/renderer_host/pepper_message_filter.cc
index 1c79a90..061d1f4 100644
--- a/content/browser/renderer_host/pepper_message_filter.cc
+++ b/content/browser/renderer_host/pepper_message_filter.cc
@@ -8,9 +8,9 @@
#include "base/process_util.h"
#include "base/threading/worker_pool.h"
#include "chrome/browser/net/chrome_url_request_context.h"
-#include "chrome/browser/profiles/profile.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/browser_render_process_host.h"
+#include "content/browser/resource_context.h"
#include "content/common/pepper_messages.h"
#include "net/base/address_list.h"
#include "net/base/host_port_pair.h"
@@ -34,9 +34,10 @@ COMPILE_ASSERT(sizeof(reinterpret_cast<PP_Flash_NetAddress*>(0)->data) >=
const PP_Flash_NetAddress kInvalidNetAddress = { 0 };
-PepperMessageFilter::PepperMessageFilter(Profile* profile)
- : profile_(profile),
- request_context_(profile_->GetRequestContext()) {
+PepperMessageFilter::PepperMessageFilter(
+ const content::ResourceContext* resource_context)
+ : resource_context_(resource_context) {
+ DCHECK(resource_context_);
}
PepperMessageFilter::~PepperMessageFilter() {}
@@ -173,13 +174,11 @@ void PepperMessageFilter::OnConnectTcp(int routing_id,
uint16 port) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- net::URLRequestContext* req_context =
- request_context_->GetURLRequestContext();
net::HostResolver::RequestInfo request_info(net::HostPortPair(host, port));
// The lookup request will delete itself on completion.
LookupRequest* lookup_request =
- new LookupRequest(this, req_context->host_resolver(),
+ new LookupRequest(this, resource_context_->host_resolver(),
routing_id, request_id, request_info);
lookup_request->Start();
}
diff --git a/content/browser/renderer_host/pepper_message_filter.h b/content/browser/renderer_host/pepper_message_filter.h
index 35adc97..3b7bc81 100644
--- a/content/browser/renderer_host/pepper_message_filter.h
+++ b/content/browser/renderer_host/pepper_message_filter.h
@@ -13,16 +13,18 @@
#include "content/browser/browser_message_filter.h"
#include "ppapi/c/private/ppb_flash_net_connector.h"
-class Profile;
+namespace content {
+class ResourceContext;
+}
namespace net {
class AddressList;
-class URLRequestContextGetter;
}
class PepperMessageFilter : public BrowserMessageFilter {
public:
- explicit PepperMessageFilter(Profile* profile);
+ explicit PepperMessageFilter(
+ const content::ResourceContext* resource_context);
virtual ~PepperMessageFilter();
private:
@@ -62,8 +64,7 @@ class PepperMessageFilter : public BrowserMessageFilter {
PP_Flash_NetAddress addr);
#endif // ENABLE_FLAPPER_HACKS
- Profile* profile_;
- scoped_refptr<net::URLRequestContextGetter> request_context_;
+ const content::ResourceContext* const resource_context_;
};
#endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_MESSAGE_FILTER_H_