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

Unified Diff: media/blink/url_index.h

Issue 2842763003: media: Send chrome-cache: frfr on first request. (Closed)
Patch Set: merge Created 3 years, 7 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 | « media/blink/resource_multibuffer_data_provider_unittest.cc ('k') | media/blink/url_index.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/url_index.h
diff --git a/media/blink/url_index.h b/media/blink/url_index.h
index bce8727f80a6341e4918e72a28a7967c74779f99..f18d358d8e818fbf4aa6168fe9bbe99045256cc3 100644
--- a/media/blink/url_index.h
+++ b/media/blink/url_index.h
@@ -139,6 +139,9 @@ class MEDIA_BLINK_EXPORT UrlData : public base::RefCounted<UrlData> {
// Accessor
blink::WebFrame* frame() const { return frame_; }
+ void AddBytesRead(int64_t b) { bytes_read_from_cache_ += b; }
+ int64_t BytesReadFromCache() { return bytes_read_from_cache_; }
+
protected:
UrlData(const GURL& url,
CORSMode cors_mode,
@@ -170,6 +173,9 @@ class MEDIA_BLINK_EXPORT UrlData : public base::RefCounted<UrlData> {
// Length of resource this url points to. (in bytes)
int64_t length_;
+ // Number of bytes read from this resource.
+ int64_t bytes_read_from_cache_ = 0;
+
// Does the server support ranges?
bool range_supported_;
« no previous file with comments | « media/blink/resource_multibuffer_data_provider_unittest.cc ('k') | media/blink/url_index.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698