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

Unified Diff: android_webview/lib/aw_content_browser_client.cc

Issue 10913074: Add WebView implementation for CookieManager. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased Created 8 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
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 aeaedf2dfcba388ed71e1353b6679977a2035589..2a07343e799bf0e3d319f988884755e51a0d4538 100644
--- a/android_webview/lib/aw_content_browser_client.cc
+++ b/android_webview/lib/aw_content_browser_client.cc
@@ -4,6 +4,7 @@
#include "android_webview/lib/aw_content_browser_client.h"
+#include "android_webview/browser/aw_cookie_access_policy.h"
#include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h"
namespace android_webview {
@@ -20,4 +21,38 @@ void AwContentBrowserClient::ResourceDispatcherHostCreated() {
AwResourceDispatcherHostDelegate::ResourceDispatcherHostCreated();
}
+bool AwContentBrowserClient::AllowGetCookie(const GURL& url,
+ const GURL& first_party,
+ const net::CookieList& cookie_list,
+ content::ResourceContext* context,
+ int render_process_id,
+ int render_view_id) {
+ // Not base-calling into ChromeContentBrowserClient as we are not dependent
+ // on chrome/ for any cookie policy decisions.
+ return AwCookieAccessPolicy::GetInstance()->AllowGetCookie(url,
+ first_party,
+ cookie_list,
+ context,
+ render_process_id,
+ render_view_id);
+}
+
+bool AwContentBrowserClient::AllowSetCookie(const GURL& url,
+ const GURL& first_party,
+ const std::string& cookie_line,
+ content::ResourceContext* context,
+ int render_process_id,
+ int render_view_id,
+ net::CookieOptions* options) {
+ // Not base-calling into ChromeContentBrowserClient as we are not dependent
+ // on chrome/ for any cookie policy decisions.
+ return AwCookieAccessPolicy::GetInstance()->AllowSetCookie(url,
+ first_party,
+ cookie_line,
+ context,
+ render_process_id,
+ render_view_id,
+ options);
+}
+
} // namespace android_webview
« no previous file with comments | « android_webview/lib/aw_content_browser_client.h ('k') | android_webview/native/android_webview_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698