summaryrefslogtreecommitdiffstats
path: root/chrome/browser/omnibox
diff options
context:
space:
mode:
authormpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-07 20:34:26 +0000
committermpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-07 20:34:26 +0000
commit7f3340184d7de73caf8b38b0b29880ee0199cefa (patch)
tree425eb4be1a6645f1ac17cc65290052931c08a338 /chrome/browser/omnibox
parent8fc0f5be02eee83d34830fe0605b30ab36a06d18 (diff)
downloadchromium_src-7f3340184d7de73caf8b38b0b29880ee0199cefa.zip
chromium_src-7f3340184d7de73caf8b38b0b29880ee0199cefa.tar.gz
chromium_src-7f3340184d7de73caf8b38b0b29880ee0199cefa.tar.bz2
Omnibox: Combine Two Input Type Enums into One
There are two input type enums: * one in the autocomplete code * one in the metrics code that's used for UMA logging; this one is meant to remain stable As part of fixing the linked bug, I created https://codereview.chromium.org/314773002/ whch needed an input type enum, one which would remain stable. It didn't necessarily have to be the metrics enum. After discussion with the UMA folks (who deal with how to handle stable enum problems all the time), we reached the conclusion that we should have one stable enum and use it everywhere. That's the cleanest answer. This single enum has to live in the metrics directory because metrics is a component. This change combines the two existing enums into one, putting the new enum in a new file in the metrics directory. The reason for a new file is so we can include it without include the whole OmniboxEventProto or any other metrics code. The main files to review are autocomplete_input.h and *.proto. All other changes are a mechanical result of the changes in those three files. The internal proto change has been submitted. TBR=stevenjb for the trivial change to chrome/browser/ui/app_list/search/omnibox_provider.cc that removes an unnecessary include BUG=284781 Review URL: https://codereview.chromium.org/319523005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/omnibox')
-rw-r--r--chrome/browser/omnibox/omnibox_log.cc2
-rw-r--r--chrome/browser/omnibox/omnibox_log.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/omnibox/omnibox_log.cc b/chrome/browser/omnibox/omnibox_log.cc
index 48f6241..ef0a08d 100644
--- a/chrome/browser/omnibox/omnibox_log.cc
+++ b/chrome/browser/omnibox/omnibox_log.cc
@@ -7,7 +7,7 @@
OmniboxLog::OmniboxLog(
const base::string16& text,
bool just_deleted_text,
- AutocompleteInput::Type input_type,
+ metrics::OmniboxInputType::Type input_type,
bool is_popup_open,
size_t selected_index,
bool is_paste_and_go,
diff --git a/chrome/browser/omnibox/omnibox_log.h b/chrome/browser/omnibox/omnibox_log.h
index f66883c..3c641ce 100644
--- a/chrome/browser/omnibox/omnibox_log.h
+++ b/chrome/browser/omnibox/omnibox_log.h
@@ -12,6 +12,7 @@
#include "chrome/browser/autocomplete/autocomplete_input.h"
#include "chrome/browser/autocomplete/autocomplete_provider.h"
#include "chrome/browser/sessions/session_id.h"
+#include "components/metrics/proto/omnibox_input_type.pb.h"
class AutocompleteResult;
@@ -21,7 +22,7 @@ struct OmniboxLog {
OmniboxLog(
const base::string16& text,
bool just_deleted_text,
- AutocompleteInput::Type input_type,
+ metrics::OmniboxInputType::Type input_type,
bool is_popup_open,
size_t selected_index,
bool is_paste_and_go,
@@ -41,7 +42,7 @@ struct OmniboxLog {
bool just_deleted_text;
// The detected type of the user's input.
- AutocompleteInput::Type input_type;
+ metrics::OmniboxInputType::Type input_type;
// True if the popup is open.
bool is_popup_open;