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

Unified Diff: net/http/http_cache.cc

Issue 935963002: Use int64 time stamp when storing metadata to the HTTP cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test case Created 5 years, 10 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/http/http_cache.h ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.cc
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index fb6f40c6c827e969400ba1c8ea912ffda8923639..5260410356d1bbf835e64a01ae8dce83042aa01f 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -212,7 +212,7 @@ class HttpCache::MetadataWriter {
// Implements the bulk of HttpCache::WriteMetadata.
void Write(const GURL& url,
- double expected_response_time,
+ base::Time expected_response_time,
IOBuffer* buf,
int buf_len);
@@ -225,13 +225,13 @@ class HttpCache::MetadataWriter {
bool verified_;
scoped_refptr<IOBuffer> buf_;
int buf_len_;
- double expected_response_time_;
+ base::Time expected_response_time_;
HttpRequestInfo request_info_;
DISALLOW_COPY_AND_ASSIGN(MetadataWriter);
};
void HttpCache::MetadataWriter::Write(const GURL& url,
- double expected_response_time,
+ base::Time expected_response_time,
IOBuffer* buf,
int buf_len) {
DCHECK_GT(buf_len, 0);
@@ -261,7 +261,7 @@ void HttpCache::MetadataWriter::VerifyResponse(int result) {
const HttpResponseInfo* response_info = transaction_->GetResponseInfo();
DCHECK(response_info->was_cached);
- if (response_info->response_time.ToDoubleT() != expected_response_time_)
+ if (response_info->response_time != expected_response_time_)
return SelfDestroy();
result = transaction_->WriteMetadata(
@@ -579,7 +579,7 @@ bool HttpCache::ParseResponseInfo(const char* data, int len,
void HttpCache::WriteMetadata(const GURL& url,
RequestPriority priority,
- double expected_response_time,
+ base::Time expected_response_time,
IOBuffer* buf,
int buf_len) {
if (!buf_len)
« no previous file with comments | « net/http/http_cache.h ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698