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

Unified Diff: chrome/browser/autocomplete/search_provider.h

Issue 10832323: Adds a UMA histogram to monitor omnibox suggest requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reactored according to Ilya's suggestions. Created 8 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
Index: chrome/browser/autocomplete/search_provider.h
diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h
index 50631579c5f06660607687e6e643e86361431ce1..523628e4c779055aae5cd2faa7a4ce74ba3d65a6 100644
--- a/chrome/browser/autocomplete/search_provider.h
+++ b/chrome/browser/autocomplete/search_provider.h
@@ -318,6 +318,19 @@ class SearchProvider : public AutocompleteProvider,
// Updates the value of |done_| from the internal state.
void UpdateDone();
+ // We keep track in a histogram how many suggest requests we send,
+ // how many suggest requests we invalidate (e.g., due to a user typing
+ // another character), and how many replies we receive.
+ enum SuggestRequestsHistogramValue {
+ REQUEST_SENT = 1,
+ REQUEST_INVALIDATED = 2,
+ REPLY_RECEIVED = 3,
+ MAX_SUGGEST_REQUEST_HISTOGRAM_VALUE = 4
Ilya Sherman 2012/08/15 23:17:37 Optional nit: Explicitly specifying "4" here means
Mark P 2012/08/15 23:28:30 Done. I thought of this at the time and then forg
+ };
+ // Increments the appropriate value in the histogram by one.
msw 2012/08/15 23:21:51 nit: blank line to separate enum/function decls.
Mark P 2012/08/15 23:28:30 Done.
+ static void LogOmniboxSuggestRequest(
+ const SuggestRequestsHistogramValue request_value);
Ilya Sherman 2012/08/15 23:17:37 nit: No need to declare the parameter as const, si
Ilya Sherman 2012/08/15 23:17:37 nit: I would move both of these definitions into a
Mark P 2012/08/15 23:28:30 Fixed in process of move to .cc file.
Mark P 2012/08/15 23:28:30 Moved. (I don't need this function & type exporte
+
// Should we query for suggest results immediately? This is normally false,
// but may be set to true during testing.
static bool query_suggest_immediately_;
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider.cc » ('j') | chrome/browser/autocomplete/search_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698