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

Unified Diff: extensions/browser/api/web_request/web_request_event_details.cc

Issue 2238383003: webRequest: Also identify frames for non-RDH-initiated requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mek's nits Created 4 years, 4 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
« no previous file with comments | « chrome/test/data/extensions/api_test/webrequest/test_osdd.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/web_request/web_request_event_details.cc
diff --git a/extensions/browser/api/web_request/web_request_event_details.cc b/extensions/browser/api/web_request/web_request_event_details.cc
index 3099ca1f8d09d8feaba1a96e837058acb80bd95b..56ec81f3944b232e6867ccef27099cc28966479b 100644
--- a/extensions/browser/api/web_request/web_request_event_details.cc
+++ b/extensions/browser/api/web_request/web_request_event_details.cc
@@ -39,6 +39,11 @@ WebRequestEventDetails::WebRequestEventDetails(const net::URLRequest* request,
render_process_id_ = info->GetChildID();
render_frame_id_ = info->GetRenderFrameID();
resource_type = info->GetResourceType();
+ } else {
+ // Fallback for requests that are not allocated by a ResourceDispatcherHost,
+ // such as the TemplateURLFetcher.
+ content::ResourceRequestInfo::GetRenderFrameForRequest(
+ request, &render_process_id_, &render_frame_id_);
}
dict_.SetString(keys::kMethodKey, request->method());
« no previous file with comments | « chrome/test/data/extensions/api_test/webrequest/test_osdd.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698