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

Unified Diff: net/cookies/cookie_monster_store_test.cc

Issue 2874843002: Shifted creation of unvalidated CanonicalCookies over to a constructor. (Closed)
Patch Set: Merged to top of dependent CL. Created 3 years, 7 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 | « net/cookies/cookie_monster.cc ('k') | net/cookies/cookie_monster_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster_store_test.cc
diff --git a/net/cookies/cookie_monster_store_test.cc b/net/cookies/cookie_monster_store_test.cc
index 34fb81db729cd68495146656dce3786881f61836..36bafc6c6a577fe5fa3dad0b351d8c6f1fc389f8 100644
--- a/net/cookies/cookie_monster_store_test.cc
+++ b/net/cookies/cookie_monster_store_test.cc
@@ -130,10 +130,10 @@ std::unique_ptr<CanonicalCookie> BuildCanonicalCookie(
: base::Time();
std::string cookie_path = pc.Path();
- return CanonicalCookie::Create(pc.Name(), pc.Value(), "." + url.host(),
- cookie_path, creation_time, cookie_expires,
- base::Time(), pc.IsSecure(), pc.IsHttpOnly(),
- pc.SameSite(), pc.Priority());
+ return base::MakeUnique<CanonicalCookie>(
+ pc.Name(), pc.Value(), "." + url.host(), cookie_path, creation_time,
+ cookie_expires, base::Time(), pc.IsSecure(), pc.IsHttpOnly(),
+ pc.SameSite(), pc.Priority());
}
void AddCookieToList(const GURL& url,
@@ -238,7 +238,7 @@ std::unique_ptr<CookieMonster> CreateMonsterFromStoreForGC(
// The URL must be HTTPS since |secure| can be true or false, and because
// strict secure cookies are enforced, the cookie will fail to be created if
// |secure| is true but the URL is an insecure scheme.
- std::unique_ptr<CanonicalCookie> cc(CanonicalCookie::Create(
+ std::unique_ptr<CanonicalCookie> cc(base::MakeUnique<CanonicalCookie>(
"a", "1", base::StringPrintf("h%05d.izzle", i), "/path", creation_time,
expiration_time, base::Time(), secure, false,
CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
« no previous file with comments | « net/cookies/cookie_monster.cc ('k') | net/cookies/cookie_monster_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698