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

Unified Diff: content/browser/webui/url_data_manager_backend.cc

Issue 2856093004: Generalize content::URLDataSource so that it can be used by the network service. (Closed)
Patch Set: review comments Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/webui/url_data_manager_backend.cc
diff --git a/content/browser/webui/url_data_manager_backend.cc b/content/browser/webui/url_data_manager_backend.cc
index 3a7431fe7c3fbddbf57d0d2e28f0204269de7651..734f431c2ce0c2da8f2b535e086504b960a9b7c1 100644
--- a/content/browser/webui/url_data_manager_backend.cc
+++ b/content/browser/webui/url_data_manager_backend.cc
@@ -680,12 +680,16 @@ bool URLDataManagerBackend::StartRequest(const net::URLRequest* request,
if (!source)
return false;
- if (!source->source()->ShouldServiceRequest(request))
+ const content::ResourceRequestInfo* info =
+ content::ResourceRequestInfo::ForRequest(request);
+ if (!source->source()->ShouldServiceRequest(
+ request->url(), info ? info->GetContext() : nullptr,
+ info ? info->GetChildID() : -1)) {
Dan Beam 2017/05/03 22:33:38 O_o can we use some temporary variables?
return false;
+ }
std::string path;
URLToRequestPath(request->url(), &path);
- source->source()->WillServiceRequest(request, &path);
// Save this request so we know where to send the data.
RequestID request_id = next_request_id_++;
@@ -730,7 +734,6 @@ bool URLDataManagerBackend::StartRequest(const net::URLRequest* request,
// Look up additional request info to pass down.
ResourceRequestInfo::WebContentsGetter wc_getter;
- const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
if (info)
wc_getter = info->GetWebContentsGetterForRequest();
« no previous file with comments | « components/dom_distiller/content/browser/dom_distiller_viewer_source.cc ('k') | content/public/browser/url_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698