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

Unified Diff: net/http/http_cache_transaction.cc

Issue 1346793002: HTTP cache: Add tests to improve coverage of AddTruncatedFlag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | net/http/http_cache_unittest.cc » ('j') | net/http/http_cache_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 450cc450eebc45ce14a61c59e0b4b301202c4f1b..db3f4968911b47ec29167190cf429a69007e00d7 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1875,7 +1875,7 @@ int HttpCache::Transaction::DoCacheWriteDataComplete(int result) {
// We want to ignore errors writing to disk and just keep reading from
// the network.
result = write_len_;
- } else if (!done_reading_ && entry_) {
+ } else if (!done_reading_ && entry_ && (!partial_ || truncated_)) {
asanka 2015/09/17 14:43:34 I'll note that this change doesn't affect the newl
rvargas (doing something else) 2015/09/17 20:18:37 These tests are actually a regression test for htt
int current_size = entry_->disk_entry->GetDataSize(kResponseContentIndex);
int64 body_size = response_.headers->GetContentLength();
if (body_size >= 0 && body_size <= current_size)
« no previous file with comments | « no previous file | net/http/http_cache_unittest.cc » ('j') | net/http/http_cache_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698