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

Unified Diff: net/http/partial_data.h

Issue 197016: Http Cache: Add support for resuming downloading a... (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/partial_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/partial_data.h
===================================================================
--- net/http/partial_data.h (revision 25542)
+++ net/http/partial_data.h (working copy)
@@ -32,7 +32,8 @@
class PartialData {
public:
PartialData()
- : range_present_(false), final_range_(false), sparse_entry_(true) {}
+ : range_present_(false), final_range_(false), sparse_entry_(true),
+ truncated_(false) {}
~PartialData() {}
// Performs initialization of the object by parsing the request |headers|
@@ -62,9 +63,10 @@
bool IsLastRange() const;
// Extracts info from headers already stored in the cache. Returns false if
- // there is any problem with the headers.
+ // there is any problem with the headers. |truncated| should be true if we
+ // have an incomplete 200 entry.
bool UpdateFromStoredHeaders(const HttpResponseHeaders* headers,
- disk_cache::Entry* entry);
+ disk_cache::Entry* entry, bool truncated);
// Returns true if the requested range is valid given the stored data.
bool IsRequestedRangeOK();
@@ -111,6 +113,7 @@
bool range_present_; // True if next range entry is already stored.
bool final_range_;
bool sparse_entry_;
+ bool truncated_; // We have an incomplete 200 stored.
DISALLOW_COPY_AND_ASSIGN(PartialData);
};
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/partial_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698