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

Unified Diff: android_webview/lib/aw_content_browser_client.cc

Issue 11090003: [Android] Upstream WebView.allow{Content|File}Access implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Workaround to remove dependency on https://codereview.chromium.org/11030051 Created 8 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 | « android_webview/lib/aw_content_browser_client.h ('k') | android_webview/native/android_protocol_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/lib/aw_content_browser_client.cc
diff --git a/android_webview/lib/aw_content_browser_client.cc b/android_webview/lib/aw_content_browser_client.cc
index 2a07343e799bf0e3d319f988884755e51a0d4538..d44a475755b544eca4744e03a13a889aeea6117d 100644
--- a/android_webview/lib/aw_content_browser_client.cc
+++ b/android_webview/lib/aw_content_browser_client.cc
@@ -6,6 +6,9 @@
#include "android_webview/browser/aw_cookie_access_policy.h"
#include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h"
+#include "android_webview/common/url_constants.h"
+#include "content/public/browser/child_process_security_policy.h"
+#include "content/public/browser/render_process_host.h"
namespace android_webview {
@@ -16,6 +19,14 @@ AwContentBrowserClient::AwContentBrowserClient()
AwContentBrowserClient::~AwContentBrowserClient() {
}
+void AwContentBrowserClient::RenderProcessHostCreated(
+ content::RenderProcessHost* host) {
+ // Grant content: scheme to the whole process, since we impose per-view
+ // access checks.
+ content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
+ host->GetID(), android_webview::kContentScheme);
+}
+
void AwContentBrowserClient::ResourceDispatcherHostCreated() {
ChromeContentBrowserClient::ResourceDispatcherHostCreated();
AwResourceDispatcherHostDelegate::ResourceDispatcherHostCreated();
« no previous file with comments | « android_webview/lib/aw_content_browser_client.h ('k') | android_webview/native/android_protocol_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698