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

Unified Diff: chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.cc

Issue 2465603002: [Extensions] Don't show a blocked action for webRequest on subframes (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | chrome/browser/extensions/api/web_request/web_request_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.cc
diff --git a/chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.cc b/chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.cc
index 96f2a1c76d7a059a8c83f39e83f86718e307b814..e473d02dd0f3c46704380b05fbe1f5d1287ba27f 100644
--- a/chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.cc
+++ b/chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.cc
@@ -22,6 +22,11 @@ void NotifyWebRequestWithheldOnUI(int render_process_id,
content::RenderFrameHost::FromID(render_process_id, render_frame_id);
if (!rfh)
return;
+ // We don't count subframe blocked actions as yet, since there's no way to
+ // surface this to the user. Ignore these (which is also what we do for
+ // content scripts).
+ if (rfh->GetParent())
+ return;
content::WebContents* web_contents =
content::WebContents::FromRenderFrameHost(rfh);
if (!web_contents)
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_request/web_request_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698