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

Unified Diff: content/browser/loader/resource_message_filter.h

Issue 1481583002: Narrow the interface to ResourceMessageFilter::GetContexts() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarify when |origin_pid| argument is used. Created 5 years, 1 month 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
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 1240cb4f5b3b7cb271595f28bf87fe738f22ec25..163f918844675c03154caed7d9c601f3e5cf2dc2 100644
--- a/content/browser/loader/resource_message_filter.h
+++ b/content/browser/loader/resource_message_filter.h
@@ -38,12 +38,18 @@ class ServiceWorkerContextWrapper;
// will not interfere with browser UI.
class CONTENT_EXPORT ResourceMessageFilter : public BrowserMessageFilter {
public:
- typedef base::Callback<void(const ResourceHostMsg_Request&,
+ // TODO(ricea): Remove origin_pid when support for NPAPI plugins is removed.
+ // crbug.com/493212 is the tracking bug for NPAPI removal.
davidben 2015/12/01 19:01:57 It's not also used by PPAPI plugins? (I don't actu
Adam Rice 2015/12/01 19:25:46 Only RenderProcessHostImpl and PluginProcessHost a
+ typedef base::Callback<void(ResourceType resource_type,
+ int origin_pid,
ResourceContext**,
net::URLRequestContext**)> GetContextsCallback;
// |appcache_service|, |blob_storage_context|, |file_system_context| may be
// NULL in unittests or for requests from the (NPAPI) plugin process.
+ // The |origin_pid| argument to |get_contexts_callback| is not used
+ // (and may be invalid) for requests that are NOT from the NPAPI plugin
+ // process.
ResourceMessageFilter(int child_id,
int process_type,
ChromeAppCacheService* appcache_service,
@@ -57,7 +63,10 @@ class CONTENT_EXPORT ResourceMessageFilter : public BrowserMessageFilter {
void OnChannelClosing() override;
bool OnMessageReceived(const IPC::Message& message) override;
- void GetContexts(const ResourceHostMsg_Request& request,
+ // |origin_pid| is only required for NPAPI plugin processes. Its value is
+ // ignored otherwise.
+ void GetContexts(ResourceType resource_type,
+ int origin_pid,
ResourceContext** resource_context,
net::URLRequestContext** request_context);
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_unittest.cc ('k') | content/browser/loader/resource_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698