Index: chrome/browser/browsing_data/browsing_data_cookie_helper.cc |
diff --git a/chrome/browser/browsing_data/browsing_data_cookie_helper.cc b/chrome/browser/browsing_data/browsing_data_cookie_helper.cc |
index 016464e50db899a9baddec853691c3373f5796d2..d5fd0b1214d2b1563506eac9b8bb8ce04d7b19df 100644 |
--- a/chrome/browser/browsing_data/browsing_data_cookie_helper.cc |
+++ b/chrome/browser/browsing_data/browsing_data_cookie_helper.cc |
@@ -139,6 +139,11 @@ void CannedBrowsingDataCookieHelper::AddChangedCookie( |
const std::string& cookie_line, |
const net::CookieOptions& options) { |
base::Time creation_time = base::Time::Now(); |
+ base::Time server_time; |
+ if (options.has_server_time()) |
+ server_time = options.server_time(); |
+ else |
+ server_time = creation_time; |
net::ParsedCookie pc(cookie_line); |
if (!pc.IsValid()) |
@@ -161,7 +166,7 @@ void CannedBrowsingDataCookieHelper::AddChangedCookie( |
pc.MACAlgorithm() : std::string(); |
base::Time cookie_expires = |
- net::CanonicalCookie::CanonExpiration(pc, creation_time); |
+ net::CanonicalCookie::CanonExpiration(pc, creation_time, server_time); |
scoped_ptr<net::CanonicalCookie> cookie( |
new net::CanonicalCookie(url, pc.Name(), pc.Value(), cookie_domain, |