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

Unified Diff: chrome/browser/extensions/extension_protocols.cc

Issue 55163006: Allow navigations performed by extensions to pass through AllowExtensionResourceLoad. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix webview case. Created 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_protocols_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_protocols.cc
diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc
index 217afa83238ef10c5bead8fe22719a03ab59f6de..80250c6a030bc64f934cbbdfd3ca4624070d6cb0 100644
--- a/chrome/browser/extensions/extension_protocols.cc
+++ b/chrome/browser/extensions/extension_protocols.cc
@@ -385,6 +385,12 @@ bool AllowExtensionResourceLoad(net::URLRequest* request,
return true;
}
+ // If the request is for navigations outside of webviews, then it should be
+ // allowed. The navigation logic in CrossSiteResourceHandler will properly
+ // transfer the navigation to a privileged process before it commits.
+ if (ResourceType::IsFrame(info->GetResourceType()) && !is_guest)
+ return true;
+
if (!content::PageTransitionIsWebTriggerable(info->GetPageTransition()))
return false;
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_protocols_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698