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

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

Issue 160513002: Reports Prerender and Profile Total Bytes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: chrome/browser/prerender/prerender_manager.h
diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h
index 2ce7a4fd6deebd3fd84d957febd58d934423ea57..211f015a584360af6e643fc92ba68e7d83229d4d 100644
--- a/chrome/browser/prerender/prerender_manager.h
+++ b/chrome/browser/prerender/prerender_manager.h
@@ -345,6 +345,14 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
// to reliably test various swap abort cases.
static void HangSessionStorageMergesForTesting();
+ // Notification that a prerender has completed and its bytes should be
+ // recorded.
+ void RecordBytes(bool used, int64 prerender_bytes);
+
+ // Add to the running tally of bytes transferred over the network for this
+ // profile if prerendering is currently enabled.
+ void AddProfileNetworkBytesIfEnabled(int64 bytes);
+
protected:
class PendingSwap;
class PrerenderData : public base::SupportsWeakPtr<PrerenderData> {
@@ -693,6 +701,10 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
CancelableRequestConsumer query_url_consumer_;
+ // The number of bytes transferred over the network for the profile this
+ // PrerenderManager is attached to.
+ int64 profile_network_bytes_;
+
DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
};

Powered by Google App Engine
This is Rietveld 408576698