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

Unified Diff: net/http/http_transaction_unittest.h

Issue 199028: Update the request time of http cache entries on 304.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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_unittest.cc ('k') | net/http/http_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_transaction_unittest.h
===================================================================
--- net/http/http_transaction_unittest.h (revision 25484)
+++ net/http/http_transaction_unittest.h (working copy)
@@ -43,6 +43,8 @@
struct MockTransaction {
const char* url;
const char* method;
+ // If |request_time| is unspecified, the current time will be used.
+ base::Time request_time;
const char* request_headers;
int load_flags;
const char* status;
@@ -219,6 +221,9 @@
std::replace(header_data.begin(), header_data.end(), '\n', '\0');
response_.request_time = base::Time::Now();
+ if (!t->request_time.is_null())
+ response_.request_time = t->request_time;
+
response_.was_cached = false;
response_.response_time = base::Time::Now();
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698