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

Unified Diff: extensions/browser/url_request_util.h

Issue 2411293002: Fix cross-renderer resource loads for <webview> with PlzNavigate. (Closed)
Patch Set: review comments 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 | « extensions/browser/guest_view/web_view/web_view_guest.cc ('k') | extensions/browser/url_request_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/url_request_util.h
diff --git a/extensions/browser/url_request_util.h b/extensions/browser/url_request_util.h
index afa0edb5a8664686eead9af126a384e4d73464f2..e39fd87de3006289725c7ba5b21c257585d4a25c 100644
--- a/extensions/browser/url_request_util.h
+++ b/extensions/browser/url_request_util.h
@@ -5,6 +5,10 @@
#ifndef EXTENSIONS_BROWSER_URL_REQUEST_UTIL_H_
#define EXTENSIONS_BROWSER_URL_REQUEST_UTIL_H_
+#include <string>
+
+#include "ui/base/page_transition_types.h"
+
namespace net {
class URLRequest;
}
@@ -30,6 +34,19 @@ bool AllowCrossRendererResourceLoad(net::URLRequest* request,
// <webview>.
bool IsWebViewRequest(const net::URLRequest* request);
+// Helper method that is called by both AllowCrossRendererResourceLoad and
+// ExtensionNavigationThrottle to share logic.
+// Sets allowed=true to allow a chrome-extension:// resource request coming from
+// renderer A to access a resource in an extension running in renderer B.
+// Returns false when it couldn't determine if the resource is allowed or not
+bool AllowCrossRendererResourceLoadHelper(bool is_guest,
+ const Extension* extension,
+ const Extension* owner_extension,
+ const std::string& partition_id,
+ const std::string& resource_path,
+ ui::PageTransition page_transition,
+ bool* allowed);
+
} // namespace url_request_util
} // namespace extensions
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_guest.cc ('k') | extensions/browser/url_request_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698