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

Unified Diff: chrome/browser/autocomplete/network_action_predictor.cc

Issue 9153004: More fine grained understanding of Omnibox navigation counts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary change. Created 8 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/network_action_predictor.cc
diff --git a/chrome/browser/autocomplete/network_action_predictor.cc b/chrome/browser/autocomplete/network_action_predictor.cc
index ce4dfb375e79482d255b6480625b2c77ecec9b86..b43ee3c0167eaa6e4d10d2c8e22c1b400a202b08 100644
--- a/chrome/browser/autocomplete/network_action_predictor.cc
+++ b/chrome/browser/autocomplete/network_action_predictor.cc
@@ -130,6 +130,8 @@ NetworkActionPredictor::Action NetworkActionPredictor::RecommendAction(
const double confidence = CalculateConfidence(user_text, match, &is_in_db);
DCHECK(confidence >= 0.0 && confidence <= 1.0);
+ UMA_HISTOGRAM_BOOLEAN("NetworkActionPredictor.MatchIsInDb", is_in_db);
+
if (is_in_db) {
// Multiple enties with the same URL are fine as the confidence may be
// different.
@@ -164,7 +166,7 @@ bool NetworkActionPredictor::IsPreconnectable(const AutocompleteMatch& match) {
case AutocompleteMatch::SEARCH_WHAT_YOU_TYPED:
case AutocompleteMatch::SEARCH_HISTORY:
case AutocompleteMatch::SEARCH_SUGGEST:
- // A match that uses a non-default search engine (e.g. for tab-to-search).
+ // A match that uses a non-default search engine (e.g. for tab-to-search).
case AutocompleteMatch::SEARCH_OTHER_ENGINE:
return true;
@@ -226,10 +228,12 @@ void NetworkActionPredictor::OnOmniboxOpenedUrl(const AutocompleteLog& log) {
if (log.text.length() < kMinimumUserTextLength)
return;
- UMA_HISTOGRAM_COUNTS("NetworkActionPredictor.NavigationCount", 1);
+ const AutocompleteMatch& match = log.result.match_at(log.selected_index);
+
+ UMA_HISTOGRAM_BOOLEAN("Prerender.OmniboxNavigationsCouldPrerender",
+ prerender::IsOmniboxEnabled(profile_));
- const GURL& opened_url =
- log.result.match_at(log.selected_index).destination_url;
+ const GURL& opened_url = match.destination_url;
const string16 lower_user_text(base::i18n::ToLower(log.text));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698