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

Unified Diff: chrome/browser/prerender/prerender_contents.h

Issue 160513002: Reports Prerender and Profile Total Bytes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing prerender UMA byte tracking. Created 6 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
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_contents.h
diff --git a/chrome/browser/prerender/prerender_contents.h b/chrome/browser/prerender/prerender_contents.h
index d657dcd02129b7df6aa7a0430e04d5e8438e0d69..ef3f7fb02b853475b9454edbedae6e79c92adaf1 100644
--- a/chrome/browser/prerender/prerender_contents.h
+++ b/chrome/browser/prerender/prerender_contents.h
@@ -303,6 +303,9 @@ class PrerenderContents : public content::NotificationObserver,
void AddResourceThrottle(
const base::WeakPtr<PrerenderResourceThrottle>& throttle);
+ // Increments the number of bytes fetched over the network for this prerender.
+ void AddNetworkBytes(int64 bytes);
+
protected:
PrerenderContents(PrerenderManager* prerender_manager,
Profile* profile,
@@ -461,6 +464,10 @@ class PrerenderContents : public content::NotificationObserver,
// throttle on the IO thread.
std::vector<base::WeakPtr<PrerenderResourceThrottle> > resource_throttles_;
+ // A running tally of the number of bytes this prerender has caused to be
+ // transferred over the network for resources. Updated with AddNetworkBytes.
+ int64 network_bytes_;
+
DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
};
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698