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

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

Issue 498223002: Add additional histogram events for prefetches to the prerender local (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 4 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 | « chrome/browser/prerender/prerender_local_predictor.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_local_predictor.cc
diff --git a/chrome/browser/prerender/prerender_local_predictor.cc b/chrome/browser/prerender/prerender_local_predictor.cc
index afc1e20dafd5c4f8110111289b1ea20189a2029b..18cbc88ad475bad83d468446939bd59f895dd2f3 100644
--- a/chrome/browser/prerender/prerender_local_predictor.cc
+++ b/chrome/browser/prerender/prerender_local_predictor.cc
@@ -1373,17 +1373,21 @@ void PrerenderLocalPredictor::IssuePrerender(
CandidatePrerenderInfo* info,
LocalPredictorURLInfo* url_info) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ RecordEvent(EVENT_ISSUE_PRERENDER_CALLED);
if (prefetch_list_->AddURL(url_info->url)) {
RecordEvent(EVENT_PREFETCH_LIST_ADDED);
// If we are prefetching rather than prerendering, now is the time to launch
// the prefetch.
if (IsLocalPredictorPrerenderPrefetchEnabled()) {
+ RecordEvent(EVENT_ISSUE_PRERENDER_PREFETCH_ENABLED);
// Obtain the render frame host that caused this prefetch.
RenderFrameHost* rfh = RenderFrameHost::FromID(info->render_process_id_,
info->render_frame_id_);
// If it is still alive, launch the prefresh.
- if (rfh)
+ if (rfh) {
rfh->Send(new PrefetchMsg_Prefetch(rfh->GetRoutingID(), url_info->url));
+ RecordEvent(EVENT_ISSUE_PRERENDER_PREFETCH_ISSUED);
+ }
}
}
PrerenderProperties* prerender_properties =
« no previous file with comments | « chrome/browser/prerender/prerender_local_predictor.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698