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

Unified Diff: net/http/partial_data.h

Issue 6588105: Http cache: Fix handling of truncated entries.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
Index: net/http/partial_data.h
===================================================================
--- net/http/partial_data.h (revision 75777)
+++ net/http/partial_data.h (working copy)
@@ -75,6 +75,9 @@
bool UpdateFromStoredHeaders(const HttpResponseHeaders* headers,
disk_cache::Entry* entry, bool truncated);
+ // Sets the byte current range to start again at zero (for a truncated entry).
+ void SetRangeToStartDownload();
+
// Returns true if the requested range is valid given the stored data.
bool IsRequestedRangeOK();
@@ -110,6 +113,8 @@
// update the internal state about the current range.
void OnNetworkReadCompleted(int result);
+ bool initial_validation() const { return initial_validation_; }
+
private:
class Core;
// Returns the length to use when scanning the cache.
@@ -129,6 +134,7 @@
bool final_range_;
bool sparse_entry_;
bool truncated_; // We have an incomplete 200 stored.
+ bool initial_validation_; // Only used for truncated entries.
Core* core_;
CompletionCallback* callback_;

Powered by Google App Engine
This is Rietveld 408576698