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

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

Issue 342053002: Add UMA metrics for Android Chrome Google Search. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated histogram name Created 6 years, 6 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.cc
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index 04f1008b8c4eebc7a145b3f2ce010cb85b9097f4..18dda00fa099efec1520d641306c6dba4989b9ef 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -1630,21 +1630,6 @@ void PrerenderManager::RecordFinalStatusWithoutCreatingPrerenderContents(
final_status);
}
-bool PrerenderManager::IsEnabled() const {
- DCHECK(CalledOnValidThread());
- if (!enabled_)
- return false;
- for (std::list<const PrerenderCondition*>::const_iterator it =
- prerender_conditions_.begin();
- it != prerender_conditions_.end();
- ++it) {
- const PrerenderCondition* condition = *it;
- if (!condition->CanPrerender())
- return false;
- }
- return true;
-}
-
void PrerenderManager::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
@@ -1880,6 +1865,21 @@ void PrerenderManager::RecordNetworkBytes(Origin origin,
origin, used, prerender_bytes, recent_profile_bytes);
}
+bool PrerenderManager::IsEnabled() const {
+ DCHECK(CalledOnValidThread());
+ if (!enabled_)
+ return false;
+ for (std::list<const PrerenderCondition*>::const_iterator it =
+ prerender_conditions_.begin();
+ it != prerender_conditions_.end();
+ ++it) {
+ const PrerenderCondition* condition = *it;
+ if (!condition->CanPrerender())
+ return false;
+ }
+ return true;
+}
+
void PrerenderManager::AddProfileNetworkBytesIfEnabled(int64 bytes) {
DCHECK_GE(bytes, 0);
if (IsEnabled() && ActuallyPrerendering())

Powered by Google App Engine
This is Rietveld 408576698