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

Unified Diff: net/cookies/cookie_monster.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/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_monster_store_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster.cc
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index 146e8acdd1a96b725398e12f2ed8e0b9264c34b8..f2bd3e4558249f5b0651df1e7d3ab4fe537bd882 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -1087,14 +1087,11 @@ bool CookieMonster::SetCookieWithDetails(const GURL& url,
cookie_path = std::string(canon_path.data() + canon_path_component.begin,
canon_path_component.len);
- std::unique_ptr<CanonicalCookie> cc(CanonicalCookie::Create(
+ std::unique_ptr<CanonicalCookie> cc(base::MakeUnique<CanonicalCookie>(
name, value, cookie_domain, cookie_path, actual_creation_time,
expiration_time, last_access_time, secure, http_only, same_site,
priority));
- if (!cc.get())
- return false;
-
CookieOptions options;
options.set_include_httponly();
options.set_same_site_cookie_mode(
« no previous file with comments | « net/cookies/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_monster_store_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698