diff options
author | mpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 01:02:09 +0000 |
---|---|---|
committer | mpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 01:02:09 +0000 |
commit | 9c8faa05bd637df0517ea5de0410f081a36efbf0 (patch) | |
tree | 337fe0e3e886cea71ceb4bb04992d331ec3c7dce /chrome/browser/omnibox | |
parent | f4bdd75a3c1bb968698d40ab292242edea1901eb (diff) | |
download | chromium_src-9c8faa05bd637df0517ea5de0410f081a36efbf0.zip chromium_src-9c8faa05bd637df0517ea5de0410f081a36efbf0.tar.gz chromium_src-9c8faa05bd637df0517ea5de0410f081a36efbf0.tar.bz2 |
Omnibox: Have UMA Log Interactions Even When Dropdown is Closed
Adds two omnibox proto fields to describe the state
of this dropdown-closed interaction.
AutocompleteActionPredictor predictor is meant to
change relatively little; I think the current code is a
slight improvement.
RLZ RecordFirstSearch() triggering is exactly the same as before.
The histogram name change is because this histogram will
be recorded under different conditions than before.
Hence, I also updated histograms.xml.
Omnibox.EventCount is a non-UMA histogram, so doesn't
need to have its name changed and does not appear
in histograms.xml.
TBR=dominich
BUG=264992
Review URL: https://codereview.chromium.org/149513008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267411 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/omnibox')
-rw-r--r-- | chrome/browser/omnibox/omnibox_log.cc | 4 | ||||
-rw-r--r-- | chrome/browser/omnibox/omnibox_log.h | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/chrome/browser/omnibox/omnibox_log.cc b/chrome/browser/omnibox/omnibox_log.cc index 2ad76a0..48f6241 100644 --- a/chrome/browser/omnibox/omnibox_log.cc +++ b/chrome/browser/omnibox/omnibox_log.cc @@ -8,7 +8,9 @@ OmniboxLog::OmniboxLog( const base::string16& text, bool just_deleted_text, AutocompleteInput::Type input_type, + bool is_popup_open, size_t selected_index, + bool is_paste_and_go, SessionID::id_type tab_id, AutocompleteInput::PageClassification current_page_classification, base::TimeDelta elapsed_time_since_user_first_modified_omnibox, @@ -18,7 +20,9 @@ OmniboxLog::OmniboxLog( : text(text), just_deleted_text(just_deleted_text), input_type(input_type), + is_popup_open(is_popup_open), selected_index(selected_index), + is_paste_and_go(is_paste_and_go), tab_id(tab_id), current_page_classification(current_page_classification), elapsed_time_since_user_first_modified_omnibox( diff --git a/chrome/browser/omnibox/omnibox_log.h b/chrome/browser/omnibox/omnibox_log.h index f3b4809..3b5d2eb 100644 --- a/chrome/browser/omnibox/omnibox_log.h +++ b/chrome/browser/omnibox/omnibox_log.h @@ -22,7 +22,9 @@ struct OmniboxLog { const base::string16& text, bool just_deleted_text, AutocompleteInput::Type input_type, + bool is_popup_open, size_t selected_index, + bool is_paste_and_go, SessionID::id_type tab_id, AutocompleteInput::PageClassification current_page_classification, base::TimeDelta elapsed_time_since_user_first_modified_omnibox, @@ -41,9 +43,17 @@ struct OmniboxLog { // The detected type of the user's input. AutocompleteInput::Type input_type; - // Selected index (if selected) or -1 (OmniboxPopupModel::kNoMatch). + // True if the popup is open. + bool is_popup_open; + + // The index of the item selected in the dropdown list. Set to 0 if the + // dropdown is closed (and therefore there is only one implicit suggestion). size_t selected_index; + // True if this is a paste-and-search or paste-and-go omnibox interaction. + // (The codebase refers to both these types as paste-and-go.) + bool is_paste_and_go; + // ID of the tab the selected autocomplete suggestion was opened in. // Set to -1 if we haven't yet determined the destination tab. SessionID::id_type tab_id; @@ -69,7 +79,9 @@ struct OmniboxLog { // The amount of time since the last time the default (i.e., inline) // match changed. This will certainly be less than - // elapsed_time_since_user_first_modified_omnibox. + // elapsed_time_since_user_first_modified_omnibox. Measuring this + // may be inappropriate in some cases (e.g., if editing is not in + // progress). In such cases, it's set to -1 milliseconds. base::TimeDelta elapsed_time_since_last_change_to_default_match; // Result set. |