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

Unified Diff: net/cookies/canonical_cookie.h

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 | « ios/net/cookies/system_cookie_util_unittest.mm ('k') | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/canonical_cookie.h
diff --git a/net/cookies/canonical_cookie.h b/net/cookies/canonical_cookie.h
index 1dc66dc817e605326c540b3784919eedf5d12cb1..a2b366ddd619724ffe63c3750db0077aeead6b00 100644
--- a/net/cookies/canonical_cookie.h
+++ b/net/cookies/canonical_cookie.h
@@ -26,6 +26,22 @@ class NET_EXPORT CanonicalCookie {
CanonicalCookie();
CanonicalCookie(const CanonicalCookie& other);
+ // This constructor does not validate or canonicalize their inputs;
+ // the resulting CanonicalCookies should not be relied on to be canonical
+ // unless the caller has done appropriate validation and canonicalization
+ // themselves.
+ CanonicalCookie(const std::string& name,
+ const std::string& value,
+ const std::string& domain,
+ const std::string& path,
+ const base::Time& creation,
+ const base::Time& expiration,
+ const base::Time& last_access,
+ bool secure,
+ bool httponly,
+ CookieSameSite same_site,
+ CookiePriority priority);
+
~CanonicalCookie();
// Supports the default copy constructor.
@@ -39,21 +55,6 @@ class NET_EXPORT CanonicalCookie {
const base::Time& creation_time,
const CookieOptions& options);
- // Creates a canonical cookie from unparsed attribute values.
- // It does not do any canonicalization.
- // |name| and |path| must not be empty.
- static std::unique_ptr<CanonicalCookie> Create(const std::string& name,
- const std::string& value,
- const std::string& domain,
- const std::string& path,
- const base::Time& creation,
- const base::Time& expiration,
- const base::Time& last_access,
- bool secure,
- bool http_only,
- CookieSameSite same_site,
- CookiePriority priority);
-
const std::string& Name() const { return name_; }
const std::string& Value() const { return value_; }
const std::string& Domain() const { return domain_; }
@@ -157,22 +158,6 @@ class NET_EXPORT CanonicalCookie {
COOKIE_PREFIX_LAST
};
- // This constructor does not validate or canonicalize their inputs;
- // the resulting CanonicalCookies should not be relied on to be canonical
- // unless the caller has done appropriate validation and canonicalization
- // themselves.
- CanonicalCookie(const std::string& name,
- const std::string& value,
- const std::string& domain,
- const std::string& path,
- const base::Time& creation,
- const base::Time& expiration,
- const base::Time& last_access,
- bool secure,
- bool httponly,
- CookieSameSite same_site,
- CookiePriority priority);
-
// Returns the CookiePrefix (or COOKIE_PREFIX_NONE if none) that
// applies to the given cookie |name|.
static CookiePrefix GetCookiePrefix(const std::string& name);
« no previous file with comments | « ios/net/cookies/system_cookie_util_unittest.mm ('k') | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698