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

Side by Side 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: Update comments in AwSettings.java 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/lib/aw_content_browser_client.h" 5 #include "android_webview/lib/aw_content_browser_client.h"
6 6
7 #include "android_webview/browser/aw_cookie_access_policy.h" 7 #include "android_webview/browser/aw_cookie_access_policy.h"
8 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h" 8 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h"
9 #include "android_webview/common/url_constants.h"
10 #include "content/public/browser/child_process_security_policy.h"
11 #include "content/public/browser/render_process_host.h"
9 12
10 namespace android_webview { 13 namespace android_webview {
11 14
12 AwContentBrowserClient::AwContentBrowserClient() 15 AwContentBrowserClient::AwContentBrowserClient()
13 : ChromeContentBrowserClient() { 16 : ChromeContentBrowserClient() {
14 } 17 }
15 18
16 AwContentBrowserClient::~AwContentBrowserClient() { 19 AwContentBrowserClient::~AwContentBrowserClient() {
17 } 20 }
18 21
22 void AwContentBrowserClient::RenderProcessHostCreated(
23 content::RenderProcessHost* host) {
24 // Grant content: scheme to the whole process, since we impose per-view
25 // access checks.
joth 2012/10/08 17:29:01 hmm I guess technically we could leave this and do
mnaganov (inactive) 2012/10/09 09:59:36 In that case we will end up with having different
26 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
27 host->GetID(), android_webview::kContentScheme);
28 }
29
19 void AwContentBrowserClient::ResourceDispatcherHostCreated() { 30 void AwContentBrowserClient::ResourceDispatcherHostCreated() {
20 ChromeContentBrowserClient::ResourceDispatcherHostCreated(); 31 ChromeContentBrowserClient::ResourceDispatcherHostCreated();
21 AwResourceDispatcherHostDelegate::ResourceDispatcherHostCreated(); 32 AwResourceDispatcherHostDelegate::ResourceDispatcherHostCreated();
22 } 33 }
23 34
24 bool AwContentBrowserClient::AllowGetCookie(const GURL& url, 35 bool AwContentBrowserClient::AllowGetCookie(const GURL& url,
25 const GURL& first_party, 36 const GURL& first_party,
26 const net::CookieList& cookie_list, 37 const net::CookieList& cookie_list,
27 content::ResourceContext* context, 38 content::ResourceContext* context,
28 int render_process_id, 39 int render_process_id,
(...skipping 20 matching lines...) Expand all
49 return AwCookieAccessPolicy::GetInstance()->AllowSetCookie(url, 60 return AwCookieAccessPolicy::GetInstance()->AllowSetCookie(url,
50 first_party, 61 first_party,
51 cookie_line, 62 cookie_line,
52 context, 63 context,
53 render_process_id, 64 render_process_id,
54 render_view_id, 65 render_view_id,
55 options); 66 options);
56 } 67 }
57 68
58 } // namespace android_webview 69 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698