Skip to content

Commit

Permalink
[Cookie Last Update Date] (2) Propagate and populate LastUpdateDate f…
Browse files Browse the repository at this point in the history
…ield

This CL adds the getters/setters for LastUpdateDate and hooks it into
the sqlite from the last CL for the last_update_utc column.
https://docs.google.com/document/d/1x7_2wVY2gSEfMlvpS4AoQtN5x7fHG_AsQ01V4CkSELI/edit

The important changes are just in a few files:
(A) Adding the new cookie field
net/cookies/canonical_cookie.h
net/cookies/canonical_cookie.cc
net/cookies/canonical_cookie_unittest.cc
(B) Hooking the field into mojom
services/network/public/mojom/cookie_manager.mojom
services/network/public/cpp/cookie_manager_mojom_traits.h
services/network/public/cpp/cookie_manager_mojom_traits.cc
services/network/public/cpp/cookie_manager_mojom_traits_unittest.cc
(C) Hooking the field into sqlite:
net/extras/sqlite/sqlite_persistent_cookie_store.cc
net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc
(D) Testing creation date inheritance:
net/cookies/cookie_monster_unittest.cc
(E) Hooking the field into android:
chrome/browser/android/cookies/cookies_fetcher_util.cc
chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java
chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/cookies/CanonicalCookie.java

This CL is part of a series:
(1) Add last_update_utc field to db
(2) Propagate and populate LastUpdateDate field
(3) Track cookie refresh delay

Bug: 1264458
Change-Id: Id48a13e5f0512ce0406d17d3d09a04b14c1f5190
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3597954
Reviewed-by: Sylvain Defresne <[email protected]>
Reviewed-by: Steven Bingler <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Reviewed-by: Joshua Bell <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: David Roger <[email protected]>
Reviewed-by: Mike West <[email protected]>
Reviewed-by: Josh Karlin <[email protected]>
Commit-Queue: Josh Karlin <[email protected]>
Cr-Commit-Position: refs/heads/main@{#996129}
  • Loading branch information
arichiv authored and Chromium LUCI CQ committed Apr 26, 2022
1 parent 3f5c943 commit 8e46adc
Show file tree
Hide file tree
Showing 53 changed files with 1,153 additions and 957 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private static void assertCookiesEqual(CanonicalCookie lhs, CanonicalCookie rhs)
Assert.assertEquals(lhs.getCreationDate(), rhs.getCreationDate());
Assert.assertEquals(lhs.getExpirationDate(), rhs.getExpirationDate());
Assert.assertEquals(lhs.getLastAccessDate(), rhs.getLastAccessDate());
Assert.assertEquals(lhs.getLastUpdateDate(), rhs.getLastUpdateDate());
Assert.assertEquals(lhs.isSecure(), rhs.isSecure());
Assert.assertEquals(lhs.isHttpOnly(), rhs.isHttpOnly());
Assert.assertEquals(lhs.getSameSite(), rhs.getSameSite());
Expand Down Expand Up @@ -87,16 +88,16 @@ public void testSaveRestoreEmptyList() throws Exception {
public void testSaveRestore() throws Exception {
ArrayList<CanonicalCookie> cookies = new ArrayList<>();
cookies.add(new CanonicalCookie("name", "value", "domain", "path", 0 /* creation */,
1 /* expiration */, 0 /* lastAccess */, false /* secure */, true /* httpOnly */,
0 /* sameSite */, 0 /* priority */, false /* same_party */, "" /* partition_key */,
1 /* sourceScheme */, 72 /* sourcePort */));
1 /* expiration */, 0 /* lastAccess */, 0 /* lastUpdate */, false /* secure */,
true /* httpOnly */, 0 /* sameSite */, 0 /* priority */, false /* same_party */,
"" /* partition_key */, 1 /* sourceScheme */, 72 /* sourcePort */));
cookies.add(new CanonicalCookie("name2", "value2", ".domain2", "path2", 10 /* creation */,
20 /* expiration */, 15 /* lastAccess */, true /* secure */, false /* httpOnly */,
1 /* sameSite */, 1 /* priority */, true /* same_party */, "" /* partition_key */,
2 /* sourceScheme */, 445 /* sourcePort */));
20 /* expiration */, 15 /* lastAccess */, 15 /* lastUpdate */, true /* secure */,
false /* httpOnly */, 1 /* sameSite */, 1 /* priority */, true /* same_party */,
"" /* partition_key */, 2 /* sourceScheme */, 445 /* sourcePort */));
cookies.add(new CanonicalCookie("name3", "value3", "domain3", "path3", 10 /* creation */,
20 /* expiration */, 15 /* lastAccess */, true /* secure */, false /* httpOnly */,
2 /* sameSite */, 2 /* priority */, false /* same_party */,
20 /* expiration */, 15 /* lastAccess */, 15 /* lastUpdate */, true /* secure */,
false /* httpOnly */, 2 /* sameSite */, 2 /* priority */, false /* same_party */,
"https://toplevelsite.com" /* partition_key */, 2 /* sourceScheme */,
-1 /* sourcePort */));

Expand Down
4 changes: 4 additions & 0 deletions chrome/browser/android/cookies/cookies_fetcher_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ void OnCookiesFetchFinished(const net::CookieList& cookies) {
i->CreationDate().ToDeltaSinceWindowsEpoch().InMicroseconds(),
i->ExpiryDate().ToDeltaSinceWindowsEpoch().InMicroseconds(),
i->LastAccessDate().ToDeltaSinceWindowsEpoch().InMicroseconds(),
i->LastUpdateDate().ToDeltaSinceWindowsEpoch().InMicroseconds(),
i->IsSecure(), i->IsHttpOnly(), static_cast<int>(i->SameSite()),
i->Priority(), i->IsSameParty(),
base::android::ConvertUTF8ToJavaString(env, pk),
Expand Down Expand Up @@ -91,6 +92,7 @@ static void JNI_CookiesFetcher_RestoreCookies(
jlong creation,
jlong expiration,
jlong last_access,
jlong last_update,
jboolean secure,
jboolean httponly,
jint same_site,
Expand Down Expand Up @@ -121,6 +123,8 @@ static void JNI_CookiesFetcher_RestoreCookies(
base::Microseconds(expiration)),
base::Time::FromDeltaSinceWindowsEpoch(
base::Microseconds(last_access)),
base::Time::FromDeltaSinceWindowsEpoch(
base::Microseconds(last_update)),
secure, httponly, static_cast<net::CookieSameSite>(same_site),
static_cast<net::CookiePriority>(priority), same_party, pk,
static_cast<net::CookieSourceScheme>(source_scheme), source_port);
Expand Down
7 changes: 4 additions & 3 deletions chrome/browser/ash/login/webview_login_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,10 @@ void InjectCookie(content::StoragePartition* storage_partition) {
std::unique_ptr<net::CanonicalCookie> cookie =
net::CanonicalCookie::CreateUnsafeCookieForTesting(
kTestCookieName, kTestCookieValue, kTestCookieHost, "/", base::Time(),
base::Time(), base::Time(), true /* secure */, false /* httponly*/,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_MEDIUM,
false /* same_party */);
base::Time(), base::Time(), base::Time(), /*secure=*/true,
/*httponly=*/false, net::CookieSameSite::NO_RESTRICTION,
net::COOKIE_PRIORITY_MEDIUM,
/*same_party=*/false);
base::RunLoop run_loop;
cookie_manager->SetCanonicalCookie(
*cookie, net::cookie_util::SimulatedCookieSource(*cookie, "https"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,10 @@ bool BrowsingDataRemoverBrowserTestBase::SetGaiaCookieForProfile(
GURL google_url = GaiaUrls::GetInstance()->secure_google_url();
auto cookie = net::CanonicalCookie::CreateUnsafeCookieForTesting(
"SAPISID", std::string(), "." + google_url.host(), "/", base::Time(),
base::Time(), base::Time(), true /* secure */, false /* httponly */,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT,
false /* same_party */);
base::Time(), base::Time(), base::Time(), /*secure=*/true,
/*httponly=*/false, net::CookieSameSite::NO_RESTRICTION,
net::COOKIE_PRIORITY_DEFAULT,
/*same_party=*/false);
bool success = false;
base::RunLoop loop;
base::OnceCallback<void(net::CookieAccessResult)> callback =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ class ThirdPartyDataRemoverTest : public InProcessBrowserTest {
std::unique_ptr<net::CanonicalCookie> cookie =
net::CanonicalCookie::CreateUnsafeCookieForTesting(
name, "foobar", host, "/", base::Time(), base::Time(), base::Time(),
/* secure= */ true, /* httponly= */ false, same_site,
net::COOKIE_PRIORITY_LOW, /* same_party= */ false);
base::Time(),
/*secure=*/true, /*httponly=*/false, same_site,
net::COOKIE_PRIORITY_LOW, /*same_party=*/false);
net::CookieOptions options;
options.set_same_site_cookie_context(cookie_context);
bool result_out;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/client_hints/client_hints_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5215,7 +5215,7 @@ class PartitionedCookiesOriginTrialBrowserTest : public InProcessBrowserTest {
const absl::optional<net::CookiePartitionKey>& partition_key) {
auto cookie = net::CanonicalCookie::CreateUnsafeCookieForTesting(
name, value, url.host(), "/", base::Time::Now() - base::Days(1),
base::Time::Now() + base::Days(1), base::Time::Now(),
base::Time::Now() + base::Days(1), base::Time::Now(), base::Time::Now(),
/*secure=*/true, /*httponly=*/false,
net::CookieSameSite::NO_RESTRICTION,
net::CookiePriority::COOKIE_PRIORITY_DEFAULT, /*same_party=*/false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ bool SetGaiaCookieForProfile(Profile* profile) {
GURL google_url = GaiaUrls::GetInstance()->secure_google_url();
auto cookie = net::CanonicalCookie::CreateUnsafeCookieForTesting(
"SAPISID", std::string(), "." + google_url.host(), "/", base::Time(),
base::Time(), base::Time(),
base::Time(), base::Time(), base::Time(),
/*secure=*/true, false, net::CookieSameSite::NO_RESTRICTION,
net::COOKIE_PRIORITY_DEFAULT, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TEST(CookiesHelperUnittest, CookieConversionWithInfiniteExpirationDate) {
const base::Time kExpirationDate = base::Time::Max();
auto cookie = net::CanonicalCookie::CreateUnsafeCookieForTesting(
"cookiename", "cookievalue", "example.com", "/", base::Time::Now(),
kExpirationDate, base::Time(), false, false,
kExpirationDate, base::Time(), base::Time(), false, false,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT, false);

// Serialize the cookie to JSON. We need to gracefully handle the infinite
Expand Down
21 changes: 12 additions & 9 deletions chrome/browser/extensions/api/cookies/cookies_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ TEST_F(ExtensionCookiesTest, ExtensionTypeCreation) {
std::unique_ptr<net::CanonicalCookie> canonical_cookie1 =
net::CanonicalCookie::CreateUnsafeCookieForTesting(
"ABC", "DEF", "www.example.com", "/", base::Time(), base::Time(),
base::Time(), false, false, net::CookieSameSite::NO_RESTRICTION,
net::COOKIE_PRIORITY_DEFAULT, false);
base::Time(), base::Time(), false, false,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT,
false);
ASSERT_NE(nullptr, canonical_cookie1.get());
Cookie cookie1 =
cookies_helpers::CreateCookie(*canonical_cookie1, "some cookie store");
Expand All @@ -113,8 +114,8 @@ TEST_F(ExtensionCookiesTest, ExtensionTypeCreation) {
std::unique_ptr<net::CanonicalCookie> canonical_cookie2 =
net::CanonicalCookie::CreateUnsafeCookieForTesting(
"ABC", "DEF", ".example.com", "/", base::Time(),
base::Time::FromDoubleT(10000), base::Time(), false, false,
net::CookieSameSite::STRICT_MODE, net::COOKIE_PRIORITY_DEFAULT,
base::Time::FromDoubleT(10000), base::Time(), base::Time(), false,
false, net::CookieSameSite::STRICT_MODE, net::COOKIE_PRIORITY_DEFAULT,
false);
ASSERT_NE(nullptr, canonical_cookie2.get());
Cookie cookie2 =
Expand All @@ -138,17 +139,19 @@ TEST_F(ExtensionCookiesTest, GetURLFromCanonicalCookie) {
std::unique_ptr<net::CanonicalCookie> cookie1 =
net::CanonicalCookie::CreateUnsafeCookieForTesting(
"ABC", "DEF", ".example.com", "/", base::Time(), base::Time(),
base::Time(), false, false, net::CookieSameSite::NO_RESTRICTION,
net::COOKIE_PRIORITY_DEFAULT, false);
base::Time(), base::Time(), false, false,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT,
false);
ASSERT_NE(nullptr, cookie1.get());
EXPECT_EQ("http://example.com/",
cookies_helpers::GetURLFromCanonicalCookie(*cookie1).spec());

std::unique_ptr<net::CanonicalCookie> cookie2 =
net::CanonicalCookie::CreateUnsafeCookieForTesting(
"ABC", "DEF", ".helloworld.com", "/", base::Time(), base::Time(),
base::Time(), true, false, net::CookieSameSite::NO_RESTRICTION,
net::COOKIE_PRIORITY_DEFAULT, false);
base::Time(), base::Time(), true, false,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT,
false);
ASSERT_NE(nullptr, cookie2.get());
EXPECT_EQ("https://helloworld.com/",
cookies_helpers::GetURLFromCanonicalCookie(*cookie2).spec());
Expand Down Expand Up @@ -183,7 +186,7 @@ TEST_F(ExtensionCookiesTest, DomainMatching) {
std::unique_ptr<net::CanonicalCookie> cookie =
net::CanonicalCookie::CreateUnsafeCookieForTesting(
"name", std::string(), tests[i].domain, "/", base::Time(),
base::Time(), base::Time(), false, false,
base::Time(), base::Time(), base::Time(), false, false,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT,
false);
ASSERT_NE(nullptr, cookie.get());
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/extensions/api/identity/identity_apitest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3464,8 +3464,8 @@ IN_PROC_BROWSER_TEST_P(ClearAllCachedAuthTokensFunctionTestWithPartitionParam,
CleanWebAuthFlowCookies) {
auto test_cookie = net::CanonicalCookie::CreateUnsafeCookieForTesting(
"test_name", "test_value", "test.com", "/", base::Time(), base::Time(),
base::Time(), true, false, net::CookieSameSite::NO_RESTRICTION,
net::COOKIE_PRIORITY_DEFAULT, false);
base::Time(), base::Time(), true, false,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT, false);
base::RunLoop set_cookie_loop;
GetCookieManager()->SetCanonicalCookie(
*test_cookie,
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/net/chrome_network_service_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ void SetCookie(network::mojom::CookieManager* cookie_manager) {
base::Time t = base::Time::Now();
auto cookie = net::CanonicalCookie::CreateUnsafeCookieForTesting(
kCookieName, kCookieValue, "www.test.com", "/", t, t + base::Days(1),
base::Time(), true /* secure */, false /* http-only*/,
base::Time(), base::Time(), /*secure=*/true, /*http-only=*/false,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT,
false /* same_party */);
/*same_party=*/false);
base::RunLoop run_loop;
cookie_manager->SetCanonicalCookie(
*cookie, net::cookie_util::SimulatedCookieSource(*cookie, "https"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ void RemoveCookieTester::AddCookie(const std::string& host,
options.set_include_httponly();
auto cookie = net::CanonicalCookie::CreateUnsafeCookieForTesting(
name, value, host, "/", base::Time(), base::Time(), base::Time(),
true /* secure*/, false /* http only*/,
base::Time(), /*secure=*/true, /*httponly=*/false,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_MEDIUM,
false /* same_party */);
/*same_party=*/false);
cookie_manager_->SetCanonicalCookie(
*cookie, net::cookie_util::SimulatedCookieSource(*cookie, "https"),
options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class CanonicalCookie {
private final long mCreation;
private final long mExpiration;
private final long mLastAccess;
private final long mLastUpdate;
private final boolean mSecure;
private final boolean mHttpOnly;
private final int mSameSite;
Expand All @@ -34,8 +35,8 @@ class CanonicalCookie {

/** Constructs a CanonicalCookie */
CanonicalCookie(String name, String value, String domain, String path, long creation,
long expiration, long lastAccess, boolean secure, boolean httpOnly, int sameSite,
int priority, boolean sameParty, String partitionKey, int sourceScheme,
long expiration, long lastAccess, long lastUpdate, boolean secure, boolean httpOnly,
int sameSite, int priority, boolean sameParty, String partitionKey, int sourceScheme,
int sourcePort) {
mName = name;
mValue = value;
Expand All @@ -44,6 +45,7 @@ class CanonicalCookie {
mCreation = creation;
mExpiration = expiration;
mLastAccess = lastAccess;
mLastUpdate = lastUpdate;
mSecure = secure;
mHttpOnly = httpOnly;
mSameSite = sameSite;
Expand Down Expand Up @@ -84,6 +86,11 @@ long getLastAccessDate() {
return mLastAccess;
}

/** @return Last updated time. */
long getLastUpdateDate() {
return mLastUpdate;
}

/** @return Expiration time. */
long getExpirationDate() {
return mExpiration;
Expand Down Expand Up @@ -193,6 +200,7 @@ private void saveToStream(DataOutputStream out) throws IOException {
out.writeLong(mCreation);
out.writeLong(mExpiration);
out.writeLong(mLastAccess);
out.writeLong(mLastUpdate);
out.writeBoolean(mSecure);
out.writeBoolean(mHttpOnly);
out.writeInt(mSameSite);
Expand All @@ -211,6 +219,7 @@ private static CanonicalCookie createFromStream(DataInputStream in) throws IOExc
in.readLong(), // creation
in.readLong(), // expiration
in.readLong(), // last access
in.readLong(), // last update
in.readBoolean(), // secure
in.readBoolean(), // httponly
in.readInt(), // samesite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ protected void onPostExecute(List<CanonicalCookie> cookies) {
CookiesFetcherJni.get().restoreCookies(cookie.getName(), cookie.getValue(),
cookie.getDomain(), cookie.getPath(), cookie.getCreationDate(),
cookie.getExpirationDate(), cookie.getLastAccessDate(),
cookie.isSecure(), cookie.isHttpOnly(), cookie.getSameSite(),
cookie.getPriority(), cookie.isSameParty(), cookie.getPartitionKey(),
cookie.sourceScheme(), cookie.sourcePort());
cookie.getLastUpdateDate(), cookie.isSecure(), cookie.isHttpOnly(),
cookie.getSameSite(), cookie.getPriority(), cookie.isSameParty(),
cookie.getPartitionKey(), cookie.sourceScheme(), cookie.sourcePort());
}
}
}.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);
Expand Down Expand Up @@ -174,12 +174,12 @@ protected Void doInBackground() {

@CalledByNative
private static CanonicalCookie createCookie(String name, String value, String domain,
String path, long creation, long expiration, long lastAccess, boolean secure,
boolean httpOnly, int sameSite, int priority, boolean sameParty, String partitionKey,
int sourceScheme, int sourcePort) {
String path, long creation, long expiration, long lastAccess, long lastUpdate,
boolean secure, boolean httpOnly, int sameSite, int priority, boolean sameParty,
String partitionKey, int sourceScheme, int sourcePort) {
return new CanonicalCookie(name, value, domain, path, creation, expiration, lastAccess,
secure, httpOnly, sameSite, priority, sameParty, partitionKey, sourceScheme,
sourcePort);
lastUpdate, secure, httpOnly, sameSite, priority, sameParty, partitionKey,
sourceScheme, sourcePort);
}

@CalledByNative
Expand Down Expand Up @@ -234,8 +234,8 @@ private static CanonicalCookie[] createCookiesArray(int size) {
interface Natives {
void persistCookies();
void restoreCookies(String name, String value, String domain, String path, long creation,
long expiration, long lastAccess, boolean secure, boolean httpOnly, int sameSite,
int priority, boolean sameParty, String partitionKey, int sourceScheme,
int sourcePort);
long expiration, long lastAccess, long lastUpdate, boolean secure, boolean httpOnly,
int sameSite, int priority, boolean sameParty, String partitionKey,
int sourceScheme, int sourcePort);
}
}
1 change: 1 addition & 0 deletions chrome/browser/sync/test/integration/cookie_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void AddSigninCookie(Profile* profile) {
kSigninCookieName, std::string(), ".google.com", "/",
/*creation=*/base::Time(),
/*expiration=*/base::Time(), /*last_access=*/base::Time(),
/*last_update=*/base::Time(),
/*secure=*/true,
/*httponly=*/false, net::CookieSameSite::NO_RESTRICTION,
net::COOKIE_PRIORITY_DEFAULT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2118,8 +2118,8 @@ TEST_F(IdentityManagerTest, CallbackSentOnAccountsCookieDeletedByUserAction) {
run_loop.QuitClosure());
auto cookie = net::CanonicalCookie::CreateUnsafeCookieForTesting(
"SAPISID", std::string(), ".google.com", "/", base::Time(), base::Time(),
base::Time(), /*secure=*/true, false, net::CookieSameSite::NO_RESTRICTION,
net::COOKIE_PRIORITY_DEFAULT, false);
base::Time(), base::Time(), /*secure=*/true, false,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT, false);
SimulateCookieDeletedByUser(identity_manager()->GetGaiaCookieManagerService(),
*cookie);
run_loop.Run();
Expand Down Expand Up @@ -2150,8 +2150,8 @@ TEST_F(IdentityManagerTest, OnNetworkInitialized) {
// through any mojo pipe.
auto cookie = net::CanonicalCookie::CreateUnsafeCookieForTesting(
"SAPISID", std::string(), ".google.com", "/", base::Time(), base::Time(),
base::Time(), /*secure=*/true, false, net::CookieSameSite::NO_RESTRICTION,
net::COOKIE_PRIORITY_DEFAULT, false);
base::Time(), base::Time(), /*secure=*/true, false,
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT, false);
test_cookie_manager_ptr->DispatchCookieChange(net::CookieChangeInfo(
*cookie, net::CookieAccessResult(), net::CookieChangeCause::EXPLICIT));
run_loop.Run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class AttributionCookieCheckerImplTest : public testing::Test {
/*creation=*/base::Time(),
/*expiration=*/base::Time(),
/*last_access=*/base::Time(),
/*last_update=*/base::Time(),
/*secure=*/true,
/*httponly=*/params.httponly,
/*same_site=*/params.same_site,
Expand Down
Loading

0 comments on commit 8e46adc

Please sign in to comment.