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

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

Issue 7210020: Added prerendering to omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 9 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
« no previous file with comments | « chrome/browser/prerender/prerender_final_status.h ('k') | chrome/browser/prerender/prerender_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_final_status.cc
diff --git a/chrome/browser/prerender/prerender_final_status.cc b/chrome/browser/prerender/prerender_final_status.cc
index 8d71e41a6768a047dce88cae8ebdfbec53eda4fd..c598106d10eb2059381ab346c76b54eb6c0eab50 100644
--- a/chrome/browser/prerender/prerender_final_status.cc
+++ b/chrome/browser/prerender/prerender_final_status.cc
@@ -51,7 +51,7 @@ COMPILE_ASSERT(arraysize(kFinalStatusNames) == FINAL_STATUS_MAX + 1,
}
-void RecordFinalStatus(FinalStatus final_status) {
+void RecordFinalStatus(Origin origin, FinalStatus final_status) {
DCHECK(final_status != FINAL_STATUS_MAX);
// FINAL_STATUS_CONTROL_GROUP indicates that the PrerenderContents
// was created only to measure "would-have-been-prerendered" for
@@ -62,6 +62,21 @@ void RecordFinalStatus(FinalStatus final_status) {
UMA_HISTOGRAM_ENUMERATION("Prerender.FinalStatus",
final_status,
FINAL_STATUS_MAX);
+ switch (origin) {
+ case ORIGIN_LINK_REL_PRERENDER:
+ UMA_HISTOGRAM_ENUMERATION("Prerender.FinalStatus_LinkRelPrerender",
+ final_status,
+ FINAL_STATUS_MAX);
+ break;
+ case ORIGIN_OMNIBOX:
+ UMA_HISTOGRAM_ENUMERATION("Prerender.FinalStatus_Omnibox",
+ final_status,
+ FINAL_STATUS_MAX);
+ break;
+ default:
+ NOTREACHED();
+ break;
+ };
}
const char* NameFromFinalStatus(FinalStatus final_status) {
« no previous file with comments | « chrome/browser/prerender/prerender_final_status.h ('k') | chrome/browser/prerender/prerender_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698