Index: net/cookies/canonical_cookie.cc |
diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc |
index 11f9e0a1b74541d06c218053c8d15404032872aa..2ee2cf456187ded7c8af7db934d80cb4e5e7dbc6 100644 |
--- a/net/cookies/canonical_cookie.cc |
+++ b/net/cookies/canonical_cookie.cc |
@@ -226,6 +226,7 @@ std::unique_ptr<CanonicalCookie> CanonicalCookie::Create( |
if (options.has_server_time()) |
server_time = options.server_time(); |
+ DCHECK(!creation_time.is_null()); |
Time cookie_expires = CanonicalCookie::CanonExpiration(parsed_cookie, |
creation_time, |
server_time); |
@@ -444,6 +445,11 @@ bool CanonicalCookie::IsCanonical() const { |
return true; |
} |
+void CanonicalCookie::SetCreationDate(base::Time new_creation_date) { |
+ DCHECK(CreationDate().is_null()); |
+ creation_date_ = new_creation_date; |
+} |
+ |
// static |
CanonicalCookie::CookiePrefix CanonicalCookie::GetCookiePrefix( |
const std::string& name) { |