Commit 47d4c253 authored by Dylan Cutler's avatar Dylan Cutler Committed by Chromium LUCI CQ

Get net:net_perftests to build if CanonicalCookie's constructor is

private.

This is part of a larger effort to make CanonicalCookie's generic
constructor private.

This CL replaces uses of the constructor with the factory
CreateUnsafeCookieForTesting. This factory is meant for test-only code
and should not be used in production.

Bug: 1102874
Change-Id: I842f1d66d746bffe17bc060c2554ba1e269d3774
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2588647Reviewed-by: default avatarMaksim Orlovich <morlovich@chromium.org>
Reviewed-by: default avatarLily Chen <chlily@chromium.org>
Commit-Queue: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/master@{#836721}
parent 17f0ceca
......@@ -87,10 +87,10 @@ class SQLitePersistentCookieStorePerfTest : public testing::Test {
base::TimeDelta::FromMicroseconds(
domain_num * kCookiesPerDomain + cookie_num));
std::string domain_name(base::StringPrintf(".domain_%d.com", domain_num));
return CanonicalCookie(base::StringPrintf("Cookie_%d", cookie_num), "1",
domain_name, "/", t, t, t, false, false,
CookieSameSite::NO_RESTRICTION,
COOKIE_PRIORITY_DEFAULT, false);
return *CanonicalCookie::CreateUnsafeCookieForTesting(
base::StringPrintf("Cookie_%d", cookie_num), "1", domain_name, "/", t,
t, t, false, false, CookieSameSite::NO_RESTRICTION,
COOKIE_PRIORITY_DEFAULT, false);
}
void SetUp() override {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment