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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/cookies/CanonicalCookie.java

Issue 876973003: Implement the "first-party-only" cookie flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FirstPartyOnly. Created 5 years, 10 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/cookies/CanonicalCookie.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/cookies/CanonicalCookie.java b/chrome/android/java/src/org/chromium/chrome/browser/cookies/CanonicalCookie.java
index 951a636d9ba6fa9829207d659fc32f02bdf86497..8657e518dd5465f26057d776c76c6b723b5452d9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/cookies/CanonicalCookie.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/cookies/CanonicalCookie.java
@@ -22,20 +22,13 @@ class CanonicalCookie {
private final long mLastAccess;
private final boolean mSecure;
private final boolean mHttpOnly;
+ private final boolean mFirstPartyOnly;
private final int mPriority;
/** Constructs a CanonicalCookie */
- CanonicalCookie(String url,
- String name,
- String value,
- String domain,
- String path,
- long creation,
- long expiration,
- long lastAccess,
- boolean secure,
- boolean httpOnly,
- int priority) {
+ CanonicalCookie(String url, String name, String value, String domain, String path,
+ long creation, long expiration, long lastAccess, boolean secure, boolean httpOnly,
+ boolean firstPartyOnly, int priority) {
mUrl = url;
mName = name;
mValue = value;
@@ -46,6 +39,7 @@ class CanonicalCookie {
mLastAccess = lastAccess;
mSecure = secure;
mHttpOnly = httpOnly;
+ mFirstPartyOnly = firstPartyOnly;
mPriority = priority;
}
@@ -59,6 +53,11 @@ class CanonicalCookie {
return mHttpOnly;
}
+ /** @return True if the cookie is First-Party only. */
+ boolean isFirstPartyOnly() {
+ return mFirstPartyOnly;
+ }
+
/** @return True if the cookie is secure. */
boolean isSecure() {
return mSecure;
@@ -121,6 +120,7 @@ class CanonicalCookie {
out.writeLong(mLastAccess);
out.writeBoolean(mSecure);
out.writeBoolean(mHttpOnly);
+ out.writeBoolean(mFirstPartyOnly);
out.writeInt(mPriority);
}
@@ -134,6 +134,6 @@ class CanonicalCookie {
throws IOException {
return new CanonicalCookie(in.readUTF(), in.readUTF(), in.readUTF(), in.readUTF(),
in.readUTF(), in.readLong(), in.readLong(), in.readLong(), in.readBoolean(),
- in.readBoolean(), in.readInt());
+ in.readBoolean(), in.readBoolean(), in.readInt());
}
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698