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

Unified Diff: chrome/browser/android/cookies/cookies_fetcher.cc

Issue 876973003: Implement the "first-party-only" cookie flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tiny bug. 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
Index: chrome/browser/android/cookies/cookies_fetcher.cc
diff --git a/chrome/browser/android/cookies/cookies_fetcher.cc b/chrome/browser/android/cookies/cookies_fetcher.cc
index 16cfbaf79e3710c4dbc130bd1ce30896eb7bf00c..20bb878ed72d3da795fdfdbe1ffdee9c745a1e7f 100644
--- a/chrome/browser/android/cookies/cookies_fetcher.cc
+++ b/chrome/browser/android/cookies/cookies_fetcher.cc
@@ -89,6 +89,7 @@ void CookiesFetcher::OnCookiesFetchFinished(const net::CookieList& cookies) {
i->LastAccessDate().ToInternalValue(),
i->IsSecure(),
i->IsHttpOnly(),
+ i->IsFirstParty(),
i->Priority());
env->SetObjectArrayElement(joa.obj(), index++, java_cookie.obj());
}
@@ -111,6 +112,7 @@ void CookiesFetcher::RestoreCookies(JNIEnv* env,
int64 last_access,
bool secure,
bool httponly,
+ bool firstparty,
int priority) {
Profile* profile = ProfileManager::GetPrimaryUserProfile();
if (!profile->HasOffTheRecordProfile()) {
@@ -130,7 +132,7 @@ void CookiesFetcher::RestoreCookies(JNIEnv* env,
base::Time::FromInternalValue(creation),
base::Time::FromInternalValue(expiration),
base::Time::FromInternalValue(last_access),
- secure, httponly, static_cast<net::CookiePriority>(priority));
+ secure, httponly, firstparty, static_cast<net::CookiePriority>(priority));
// The rest must be done from the IO thread.
content::BrowserThread::PostTask(
@@ -166,6 +168,7 @@ void CookiesFetcher::RestoreToCookieJarInternal(
cookie.ExpiryDate(),
cookie.IsSecure(),
cookie.IsHttpOnly(),
+ cookie.IsFirstParty(),
cookie.Priority(),
cb
);

Powered by Google App Engine
This is Rietveld 408576698