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

Unified Diff: net/cookies/canonical_cookie.h

Issue 2882063002: Add a SetCanonicalCookie method for CookieMonster. (Closed)
Patch Set: Fix AW cookie store wrapper. Created 3 years, 6 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_persistent.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 1d3b3ed5337debcdfef591bfa54837bef56fdbe4..78870ec5a1306b769a2f38fc59882e2f40b7024d 100644
--- a/net/cookies/canonical_cookie.h
+++ b/net/cookies/canonical_cookie.h
@@ -47,8 +47,8 @@ class NET_EXPORT CanonicalCookie {
// Supports the default copy constructor.
// Creates a new |CanonicalCookie| from the |cookie_line| and the
- // |creation_time|. Canonicalizes and validates inputs. May return NULL if
- // an attribute value is invalid.
+ // |creation_time|. Canonicalizes and validates inputs. May return NULL if
+ // an attribute value is invalid. |creation_time| may not be null.
static std::unique_ptr<CanonicalCookie> Create(
const GURL& url,
const std::string& cookie_line,
@@ -159,6 +159,11 @@ class NET_EXPORT CanonicalCookie {
// greater than the last access time.
bool IsCanonical() const;
+ // Sets the creation date of the cookie to the specified value. It
+ // is only valid to call this method if the existing creation date
+ // is null.
+ void SetCreationDate(base::Time new_creation_date);
+
private:
FRIEND_TEST_ALL_PREFIXES(CanonicalCookieTest, TestPrefixHistograms);
« no previous file with comments | « ios/net/cookies/cookie_store_ios_persistent.mm ('k') | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698