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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 11339032: Account for server vs host clock skew in cookie expiration times. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable test on Android as there's no test server Created 8 years, 2 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 | « net/url_request/url_request_http_job.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 2860e7e5f0bf359e63082e35f2ad5680f367b6b5..78c9da29841f7d6403a89c84c708b44c3409475c 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -566,6 +566,9 @@ void URLRequestHttpJob::SaveCookiesAndNotifyHeadersComplete(int result) {
FetchResponseCookies(&response_cookies_);
+ if (!GetResponseHeaders()->GetDateValue(&response_date_))
+ response_date_ = base::Time();
+
// Now, loop over the response cookies, and attempt to persist each.
SaveNextCookie();
}
@@ -592,6 +595,7 @@ void URLRequestHttpJob::SaveNextCookie() {
response_cookies_.size() > 0) {
CookieOptions options;
options.set_include_httponly();
+ options.set_server_time(response_date_);
net::CookieStore::SetCookiesCallback callback(
base::Bind(&URLRequestHttpJob::OnCookieSaved,
« no previous file with comments | « net/url_request/url_request_http_job.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698