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

Unified Diff: net/cookies/canonical_cookie.h

Issue 2861063003: Remove dangerous CanonicalCookie::Create method. (Closed)
Patch Set: Use creation_time for last_access_time as per Elly's suggestion. 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/cookie_store_ios_test_util.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 18d9302e66b9ba37becfa25897640d8c09372e73..1dc66dc817e605326c540b3784919eedf5d12cb1 100644
--- a/net/cookies/canonical_cookie.h
+++ b/net/cookies/canonical_cookie.h
@@ -40,22 +40,8 @@ class NET_EXPORT CanonicalCookie {
const CookieOptions& options);
// Creates a canonical cookie from unparsed attribute values.
- // Canonicalizes and validates inputs. May return NULL if an attribute
- // value is invalid.
- static std::unique_ptr<CanonicalCookie> Create(const GURL& url,
- const std::string& name,
- const std::string& value,
- const std::string& domain,
- const std::string& path,
- const base::Time& creation,
- const base::Time& expiration,
- bool secure,
- bool http_only,
- CookieSameSite same_site,
- CookiePriority priority);
-
- // Creates a canonical cookie from unparsed attribute values.
- // It does not do any validation.
+ // 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,
@@ -137,7 +123,8 @@ class NET_EXPORT CanonicalCookie {
std::string DebugString() const;
- static std::string CanonPath(const GURL& url, const ParsedCookie& pc);
+ static std::string CanonPathWithString(const GURL& url,
+ const std::string& path_string);
// Returns a "null" time if expiration was unspecified or invalid.
static base::Time CanonExpiration(const ParsedCookie& pc,
« no previous file with comments | « ios/net/cookies/cookie_store_ios_test_util.mm ('k') | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698