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

Unified Diff: net/http/http_cache.cc

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 ed362003b00739ad4e4a542aee06a5740a03bd62..fb6f40c6c827e969400ba1c8ea912ffda8923639 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -211,7 +211,9 @@ class HttpCache::MetadataWriter {
~MetadataWriter() {}
// Implements the bulk of HttpCache::WriteMetadata.
- void Write(const GURL& url, base::Time expected_response_time, IOBuffer* buf,
+ void Write(const GURL& url,
+ double expected_response_time,
+ IOBuffer* buf,
int buf_len);
private:
@@ -223,14 +225,15 @@ class HttpCache::MetadataWriter {
bool verified_;
scoped_refptr<IOBuffer> buf_;
int buf_len_;
- base::Time expected_response_time_;
+ double expected_response_time_;
HttpRequestInfo request_info_;
DISALLOW_COPY_AND_ASSIGN(MetadataWriter);
};
void HttpCache::MetadataWriter::Write(const GURL& url,
- base::Time expected_response_time,
- IOBuffer* buf, int buf_len) {
+ double expected_response_time,
+ IOBuffer* buf,
+ int buf_len) {
DCHECK_GT(buf_len, 0);
DCHECK(buf);
DCHECK(buf->data());
@@ -258,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 != expected_response_time_)
+ if (response_info->response_time.ToDoubleT() != expected_response_time_)
return SelfDestroy();
result = transaction_->WriteMetadata(
@@ -576,7 +579,7 @@ bool HttpCache::ParseResponseInfo(const char* data, int len,
void HttpCache::WriteMetadata(const GURL& url,
RequestPriority priority,
- base::Time expected_response_time,
+ double 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