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

Unified Diff: net/http/http_cache_transaction.cc

Issue 12886022: Implement offline mode behind a flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added tests. Created 7 years, 8 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
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 491f2f39345013eeb2508d8b30942fc3cbabb2d9..ac22d176f0ee320555d677c8bf726a0c370dee49 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -884,6 +884,7 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() {
next_state_ = STATE_SEND_REQUEST;
return OK;
}
+
if (handling_206_ && mode_ == READ_WRITE && !truncated_ && !is_sparse_) {
// We have stored the full entry, but it changed and the server is
// sending a range. We have to delete the old entry.
@@ -1212,6 +1213,7 @@ int HttpCache::Transaction::DoUpdateCachedResponse() {
response_.headers->Update(*new_response_->headers);
response_.response_time = new_response_->response_time;
response_.request_time = new_response_->request_time;
+ response_.network_accessed = new_response_->network_accessed;
if (response_.headers->HasHeaderValue("cache-control", "no-store")) {
if (!entry_->doomed) {

Powered by Google App Engine
This is Rietveld 408576698