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

Unified Diff: net/http/partial_data.h

Issue 1230113012: [net] Better StopCaching() handling for HttpCache::Transaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Release cache lock early and request open range if it's the final range. Created 5 years, 5 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
diff --git a/net/http/partial_data.h b/net/http/partial_data.h
index 649d4623e0120bea74d6701567723d64b25bf1c6..3073bbfac88dd706cebb115444c0cacdeb31ffbd 100644
--- a/net/http/partial_data.h
+++ b/net/http/partial_data.h
@@ -120,8 +120,12 @@ class PartialData {
bool initial_validation() const { return initial_validation_; }
private:
+ // Returned by GetNextRangeLen() to indicate that the next range extends to
+ // EOF.
+ static const int64 kUnbounded;
rvargas (doing something else) 2015/07/27 22:25:12 does this has to be part of the header? (as oppose
asanka 2015/08/18 22:46:59 Moved to anon namespace.
+
// Returns the length to use when scanning the cache.
- int GetNextRangeLen();
+ int64 GetNextRangeLen();
// Completion routine for our callback.
void GetAvailableRangeCompleted(int64* start, int result);
@@ -130,7 +134,7 @@ class PartialData {
int64 current_range_end_;
int64 cached_start_;
int64 resource_size_;
- int cached_min_len_;
+ int64 cached_min_len_;
HttpByteRange byte_range_; // The range requested by the user.
// The clean set of extra headers (no ranges).
HttpRequestHeaders extra_headers_;

Powered by Google App Engine
This is Rietveld 408576698