Index: chrome/browser/prerender/prerender_observer.cc |
=================================================================== |
--- chrome/browser/prerender/prerender_observer.cc (revision 98269) |
+++ chrome/browser/prerender/prerender_observer.cc (working copy) |
@@ -80,19 +80,6 @@ |
base::Histogram* time_hover_until_click_; |
}; |
-enum PAGEVIEW_EVENTS { |
- PAGEVIEW_EVENT_NEW_URL = 0, |
- PAGEVIEW_EVENT_TOP_SITE_NEW_URL = 1, |
- PAGEVIEW_EVENT_LOAD_START = 2, |
- PAGEVIEW_EVENT_TOP_SITE_LOAD_START = 3, |
- PAGEVIEW_EVENT_MAX = 4 |
-}; |
- |
-void RecordPageviewEvent(PAGEVIEW_EVENTS event) { |
- UMA_HISTOGRAM_ENUMERATION("Prerender.PageviewEvents", |
- event, PAGEVIEW_EVENT_MAX); |
-} |
- |
} // namespace |
class PrerenderObserver::HoverData { |
@@ -193,9 +180,6 @@ |
void PrerenderObserver::ProvisionalChangeToMainFrameUrl(const GURL& url, |
bool has_opener_set) { |
- RecordPageviewEvent(PAGEVIEW_EVENT_NEW_URL); |
- if (IsTopSite(url)) |
- RecordPageviewEvent(PAGEVIEW_EVENT_TOP_SITE_NEW_URL); |
if (!tab_->delegate()) |
return; // PrerenderManager needs a delegate to handle the swap. |
PrerenderManager* prerender_manager = MaybeGetPrerenderManager(); |
@@ -221,10 +205,6 @@ |
bool has_opener_set, |
const GURL& url) { |
if (is_main_frame) { |
- RecordPageviewEvent(PAGEVIEW_EVENT_LOAD_START); |
- if (IsTopSite(url)) |
- RecordPageviewEvent(PAGEVIEW_EVENT_TOP_SITE_LOAD_START); |
- |
// Record the beginning of a new PPLT navigation. |
pplt_load_start_ = base::TimeTicks::Now(); |
@@ -261,7 +241,7 @@ |
pplt_load_start_ = base::TimeTicks(); |
} |
-PrerenderManager* PrerenderObserver::MaybeGetPrerenderManager() const { |
+PrerenderManager* PrerenderObserver::MaybeGetPrerenderManager() { |
Profile* profile = |
Profile::FromBrowserContext(tab_contents()->browser_context()); |
return profile->GetPrerenderManager(); |
@@ -323,9 +303,4 @@ |
current_hover_url_ = GURL(); |
} |
-bool PrerenderObserver::IsTopSite(const GURL& url) const { |
- PrerenderManager* pm = MaybeGetPrerenderManager(); |
- return (pm && pm->IsTopSite(url)); |
-} |
- |
} // namespace prerender |