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

Unified Diff: media/blink/url_index.h

Issue 2983733002: media: Add UMA stats for bytes going in and out of multibuffer cache (Closed)
Patch Set: Created 3 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: media/blink/url_index.h
diff --git a/media/blink/url_index.h b/media/blink/url_index.h
index 70d84109db7e3eddd7c01dfc0d3f9b5548ddd6fa..c3f17a92787726a0bcf38dd61dd578a60683917f 100644
--- a/media/blink/url_index.h
+++ b/media/blink/url_index.h
@@ -143,7 +143,9 @@ class MEDIA_BLINK_EXPORT UrlData : public base::RefCounted<UrlData> {
blink::WebLocalFrame* frame() const { return frame_; }
void AddBytesRead(int64_t b) { bytes_read_from_cache_ += b; }
- int64_t BytesReadFromCache() { return bytes_read_from_cache_; }
+ int64_t BytesReadFromCache() const { return bytes_read_from_cache_; }
+ void AddBytesReadFromNetwork(int64_t b) { bytes_read_from_network_ += b; }
+ int64_t BytesReadFromNetwork() const { return bytes_read_from_network_; }
protected:
UrlData(const GURL& url,
@@ -179,6 +181,9 @@ class MEDIA_BLINK_EXPORT UrlData : public base::RefCounted<UrlData> {
// Number of bytes read from this resource.
int64_t bytes_read_from_cache_ = 0;
+ // Number of bytes read from network into the cache for this resource.
+ int64_t bytes_read_from_network_ = 0;
+
// Does the server support ranges?
bool range_supported_;

Powered by Google App Engine
This is Rietveld 408576698