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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwCookieManager.java

Issue 241143002: Allows AwCookieManager to block ThirdParty cookies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed toThirdPartyUrl use Created 6 years, 8 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/java/src/org/chromium/android_webview/AwCookieManager.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwCookieManager.java b/android_webview/java/src/org/chromium/android_webview/AwCookieManager.java
index c1bae3681f416d049d0b0065821972806e3acf34..ab91e5d48bf9f55844b2fa350e8cdcb9a719cc30 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwCookieManager.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwCookieManager.java
@@ -30,6 +30,22 @@ public final class AwCookieManager {
}
/**
+ * Control whether third party cookies are enabled or disabled
+ * @param accept TRUE if accept third party cookies
+ */
+ public void setAcceptThirdPartyCookie(boolean accept) {
+ nativeSetAcceptThirdPartyCookie(accept);
+ }
+
+ /**
+ * Return whether third party cookies are enabled
+ * @return TRUE if accept third party cookies
+ */
+ public boolean acceptThirdPartyCookie() {
+ return nativeAcceptThirdPartyCookie();
+ }
+
+ /**
* Set cookie for a given url. The old cookie with same host/path/name will
* be removed. The new cookie will be added if it is not expired or it does
* not have expiration which implies it is session cookie.
@@ -107,6 +123,9 @@ public final class AwCookieManager {
private native void nativeSetAcceptCookie(boolean accept);
private native boolean nativeAcceptCookie();
+ private native void nativeSetAcceptThirdPartyCookie(boolean accept);
+ private native boolean nativeAcceptThirdPartyCookie();
+
private native void nativeSetCookie(String url, String value);
private native String nativeGetCookie(String url);

Powered by Google App Engine
This is Rietveld 408576698