Index: net/cookies/cookie_monster.cc |
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc |
index d1f342680ca3a4d1b1a0155414b92d7debffc66a..eab2e0e050f62a670d3b116aae8335e5626fb606 100644 |
--- a/net/cookies/cookie_monster.cc |
+++ b/net/cookies/cookie_monster.cc |
@@ -1703,6 +1703,11 @@ bool CookieMonster::SetCookieWithCreationTimeAndOptions( |
creation_time = CurrentTime(); |
last_time_seen_ = creation_time; |
} |
+ Time server_time; |
+ if (options.has_server_time()) |
+ server_time = options.server_time(); |
+ else |
+ server_time = creation_time; |
// Parse the cookie. |
ParsedCookie pc(cookie_line); |
@@ -1728,7 +1733,8 @@ bool CookieMonster::SetCookieWithCreationTimeAndOptions( |
pc.MACAlgorithm() : std::string(); |
scoped_ptr<CanonicalCookie> cc; |
- Time cookie_expires = CanonicalCookie::CanonExpiration(pc, creation_time); |
+ Time cookie_expires = |
+ CanonicalCookie::CanonExpiration(pc, creation_time, server_time); |
cc.reset(new CanonicalCookie(url, pc.Name(), pc.Value(), cookie_domain, |
cookie_path, mac_key, mac_algorithm, |