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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.h

Issue 13730016: Omnibox UMA: Record How People Enter Keyword Mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix views Created 7 years, 8 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/ui/gtk/omnibox/omnibox_view_gtk.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_edit_model.h
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.h b/chrome/browser/ui/omnibox/omnibox_edit_model.h
index 1ca4635b63896cd3ed536813eb7dc1c53c201e14..23f9e9011848e5377753a6114359d003a62ddd3f 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.h
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h
@@ -59,6 +59,15 @@ enum OmniboxFocusChangeReason {
OMNIBOX_FOCUS_CHANGE_TYPING,
};
+// Reasons why the Omnibox could change into keyword mode.
+// These numeric values are used in UMA logs; do not change them.
+enum EnteredKeywordModeMethod {
+ ENTERED_KEYWORD_MODE_VIA_TAB = 0,
+ ENTERED_KEYWORD_MODE_VIA_SPACE_AT_END = 1,
+ ENTERED_KEYWORD_MODE_VIA_SPACE_IN_MIDDLE = 2,
+ ENTERED_KEYWORD_MODE_NUM_ITEMS
+};
+
class OmniboxEditModel : public AutocompleteControllerDelegate {
public:
struct State {
@@ -221,8 +230,10 @@ class OmniboxEditModel : public AutocompleteControllerDelegate {
bool is_keyword_hint() const { return is_keyword_hint_; }
// Accepts the current keyword hint as a keyword. It always returns true for
- // caller convenience.
- bool AcceptKeyword();
+ // caller convenience. |entered_method| indicates how the use entered
+ // keyword mode. This parameter is only used for metrics/logging; it's not
+ // used to change user-visible behavior.
+ bool AcceptKeyword(EnteredKeywordModeMethod entered_method);
// Clears the current keyword. |visible_text| is the (non-keyword) text
// currently visible in the edit.
« no previous file with comments | « chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698