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

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

Issue 1773133002: SameSite: Implement 'Strict'/'Lax' attribute parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke@ Created 4 years, 9 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 b419a48f87fcf6ced0575b3b9e2d5378bcad828b..4a1455d166837a302b99d94b90aab08e8029b886 100644
--- a/chrome/browser/android/cookies/cookies_fetcher.cc
+++ b/chrome/browser/android/cookies/cookies_fetcher.cc
@@ -85,7 +85,7 @@ void CookiesFetcher::OnCookiesFetchFinished(const net::CookieList& cookies) {
base::android::ConvertUTF8ToJavaString(env, i->Path()).obj(),
i->CreationDate().ToInternalValue(), i->ExpiryDate().ToInternalValue(),
i->LastAccessDate().ToInternalValue(), i->IsSecure(), i->IsHttpOnly(),
- i->IsSameSite(), i->Priority());
+ static_cast<int>(i->SameSite()), i->Priority());
env->SetObjectArrayElement(joa.obj(), index++, java_cookie.obj());
}
@@ -107,7 +107,7 @@ void CookiesFetcher::RestoreCookies(JNIEnv* env,
int64_t last_access,
bool secure,
bool httponly,
- bool same_site,
+ int same_site,
int priority) {
Profile* profile = ProfileManager::GetPrimaryUserProfile();
if (!profile->HasOffTheRecordProfile()) {
@@ -126,7 +126,8 @@ void CookiesFetcher::RestoreCookies(JNIEnv* env,
base::android::ConvertJavaStringToUTF8(env, path),
base::Time::FromInternalValue(creation),
base::Time::FromInternalValue(expiration),
- base::Time::FromInternalValue(last_access), secure, httponly, same_site,
+ base::Time::FromInternalValue(last_access), secure, httponly,
+ static_cast<net::CookieSameSite>(same_site),
static_cast<net::CookiePriority>(priority));
// The rest must be done from the IO thread.
@@ -162,7 +163,7 @@ void CookiesFetcher::RestoreToCookieJarInternal(
store->SetCookieWithDetailsAsync(
cookie.Source(), cookie.Name(), cookie.Value(), cookie.Domain(),
cookie.Path(), base::Time(), cookie.ExpiryDate(), cookie.LastAccessDate(),
- cookie.IsSecure(), cookie.IsHttpOnly(), cookie.IsSameSite(),
+ cookie.IsSecure(), cookie.IsHttpOnly(), cookie.SameSite(),
experimental_features_enabled, cookie.Priority(), cb);
}
« no previous file with comments | « chrome/browser/android/cookies/cookies_fetcher.h ('k') | chrome/browser/browsing_data/cookies_tree_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698