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

Unified Diff: extensions/shell/browser/shell_extensions_browser_client.cc

Issue 573843002: Allows webview to access extension resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forgot to add the namespace on chrome_url_request_util.cc Created 6 years, 3 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/shell/browser/shell_browser_main_parts.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/shell/browser/shell_extensions_browser_client.cc
diff --git a/extensions/shell/browser/shell_extensions_browser_client.cc b/extensions/shell/browser/shell_extensions_browser_client.cc
index 1ab909b637e0f515e149fb8b9540d768a438947e..3f5db80e7f689621d47f65d6bd9c8043f7766e6b 100644
--- a/extensions/shell/browser/shell_extensions_browser_client.cc
+++ b/extensions/shell/browser/shell_extensions_browser_client.cc
@@ -17,6 +17,7 @@
#include "extensions/browser/extension_function_registry.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/null_app_sorting.h"
+#include "extensions/browser/url_request_util.h"
#include "extensions/shell/browser/shell_extension_host_delegate.h"
#include "extensions/shell/browser/shell_extension_system_factory.h"
#include "extensions/shell/browser/shell_runtime_api_delegate.h"
@@ -127,7 +128,13 @@ bool ShellExtensionsBrowserClient::AllowCrossRendererResourceLoad(
bool is_incognito,
const Extension* extension,
InfoMap* extension_info_map) {
- // Note: This may need to change if app_shell supports webview.
+ bool allowed = false;
+ if (url_request_util::AllowCrossRendererResourceLoad(
+ request, is_incognito, extension, extension_info_map, &allowed)) {
+ return allowed;
+ }
+
+ // Couldn't determine if resource is allowed. Block the load.
return false;
}
« no previous file with comments | « extensions/shell/browser/shell_browser_main_parts.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698