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

Issue 319523005: Omnibox: Combine Two Input Type Enums into One (Closed)

Created:
6 years, 6 months ago by Mark P
Modified:
6 years, 6 months ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, extensions-reviews_chromium.org, tfarina, jar+watch_chromium.org, asvitkine+watch_chromium.org, chromium-apps-reviews_chromium.org, James Su, Ilya Sherman
Visibility:
Public.

Description

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 NOTRY=True Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=275696 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=275713

Patch Set 1 #

Patch Set 2 : change spacing #

Patch Set 3 : remove blank line #

Total comments: 15

Patch Set 4 : followed suggestions #

Total comments: 8

Patch Set 5 : comments, plus fixing unit tests #

Patch Set 6 : rebase #

Patch Set 7 : make compile after rebasing #

Patch Set 8 : rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+303 lines, -263 lines) Patch
M chrome/browser/autocomplete/autocomplete_input.h View 1 2 3 1 chunk +2 lines, -11 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_input.cc View 1 2 3 4 5 18 chunks +53 lines, -45 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_input_unittest.cc View 1 2 3 4 3 chunks +118 lines, -109 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_provider.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autocomplete/autocomplete_result.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/autocomplete/base_search_provider.cc View 4 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/autocomplete/bookmark_provider.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/builtin_provider.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/autocomplete/extension_app_provider.h View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/extension_app_provider.cc View 1 2 3 4 4 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/autocomplete/history_quick_provider.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/autocomplete/history_url_provider.cc View 1 2 3 4 5 6 7 chunks +11 lines, -10 lines 0 comments Download
M chrome/browser/autocomplete/history_url_provider_unittest.cc View 1 2 3 4 5 1 chunk +8 lines, -8 lines 0 comments Download
M chrome/browser/autocomplete/keyword_provider.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/keyword_provider.cc View 1 2 3 4 5 4 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.cc View 1 2 3 4 11 chunks +15 lines, -13 lines 0 comments Download
M chrome/browser/autocomplete/shortcuts_provider.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/autocomplete/zero_suggest_provider.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/metrics/omnibox_metrics_provider.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -19 lines 0 comments Download
M chrome/browser/omnibox/omnibox_log.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/omnibox/omnibox_log.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/app_list/search/omnibox_provider.cc View 1 chunk +0 lines, -1 line 0 comments Download
M components/metrics.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M components/metrics/proto/omnibox_event.proto View 1 2 3 4 5 6 7 2 chunks +3 lines, -12 lines 0 comments Download
A components/metrics/proto/omnibox_input_type.proto View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Mark P
Guys, please take a look. Thanks! --mark https://codereview.chromium.org/319523005/diff/40001/components/metrics/proto/omnibox_input_type.proto File components/metrics/proto/omnibox_input_type.proto (right): https://codereview.chromium.org/319523005/diff/40001/components/metrics/proto/omnibox_input_type.proto#newcode14 components/metrics/proto/omnibox_input_type.proto:14: // Note ...
6 years, 6 months ago (2014-06-06 00:35:46 UTC) #1
Ilya Sherman
Thanks, Mark. I'm not super convinced that this is so much better than what we ...
6 years, 6 months ago (2014-06-06 05:01:02 UTC) #2
Peter Kasting
https://codereview.chromium.org/319523005/diff/40001/chrome/browser/autocomplete/autocomplete_input.h File chrome/browser/autocomplete/autocomplete_input.h (right): https://codereview.chromium.org/319523005/diff/40001/chrome/browser/autocomplete/autocomplete_input.h#newcode122 chrome/browser/autocomplete/autocomplete_input.h:122: metrics::OmniboxInputType::Type type, base::string16* text); On 2014/06/06 05:01:01, Ilya Sherman ...
6 years, 6 months ago (2014-06-06 18:13:07 UTC) #3
Mark P
Please review my comments / take another look. Also, >>> Note: There is actually a ...
6 years, 6 months ago (2014-06-06 20:22:51 UTC) #4
Ilya Sherman
LGTM % nits. Thanks. https://codereview.chromium.org/319523005/diff/40001/chrome/browser/autocomplete/autocomplete_input.cc File chrome/browser/autocomplete/autocomplete_input.cc (right): https://codereview.chromium.org/319523005/diff/40001/chrome/browser/autocomplete/autocomplete_input.cc#newcode124 chrome/browser/autocomplete/autocomplete_input.cc:124: return std::string(); On 2014/06/06 20:22:51, ...
6 years, 6 months ago (2014-06-06 20:29:24 UTC) #5
Peter Kasting
https://codereview.chromium.org/319523005/diff/40001/chrome/browser/autocomplete/autocomplete_input.h File chrome/browser/autocomplete/autocomplete_input.h (right): https://codereview.chromium.org/319523005/diff/40001/chrome/browser/autocomplete/autocomplete_input.h#newcode122 chrome/browser/autocomplete/autocomplete_input.h:122: metrics::OmniboxInputType::Type type, base::string16* text); On 2014/06/06 20:22:51, Mark P ...
6 years, 6 months ago (2014-06-06 20:37:08 UTC) #6
Peter Kasting
LGTM modulo comment https://codereview.chromium.org/319523005/diff/60001/chrome/browser/autocomplete/extension_app_provider.cc File chrome/browser/autocomplete/extension_app_provider.cc (right): https://codereview.chromium.org/319523005/diff/60001/chrome/browser/autocomplete/extension_app_provider.cc#newcode138 chrome/browser/autocomplete/extension_app_provider.cc:138: input.type() != metrics::OmniboxInputType::FORCED_QUERY; Nit: Put parens ...
6 years, 6 months ago (2014-06-06 20:42:33 UTC) #7
Mark P
https://codereview.chromium.org/319523005/diff/40001/chrome/browser/autocomplete/autocomplete_input.h File chrome/browser/autocomplete/autocomplete_input.h (right): https://codereview.chromium.org/319523005/diff/40001/chrome/browser/autocomplete/autocomplete_input.h#newcode122 chrome/browser/autocomplete/autocomplete_input.h:122: metrics::OmniboxInputType::Type type, base::string16* text); On 2014/06/06 20:37:08, Peter Kasting ...
6 years, 6 months ago (2014-06-06 21:24:52 UTC) #8
Mark P
The CQ bit was checked by mpearson@chromium.org
6 years, 6 months ago (2014-06-07 16:12:44 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mpearson@chromium.org/319523005/140001
6 years, 6 months ago (2014-06-07 16:13:01 UTC) #10
commit-bot: I haz the power
Change committed as 275696
6 years, 6 months ago (2014-06-07 20:34:30 UTC) #11
dcheng
A revert of this CL has been created in https://codereview.chromium.org/320713002/ by dcheng@chromium.org. The reason for ...
6 years, 6 months ago (2014-06-07 23:17:49 UTC) #12
Vitaly Buka (NO REVIEWS)
The CQ bit was checked by vitalybuka@chromium.org
6 years, 6 months ago (2014-06-08 00:00:58 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mpearson@chromium.org/319523005/140001
6 years, 6 months ago (2014-06-08 00:01:45 UTC) #14
commit-bot: I haz the power
Change committed as 275713
6 years, 6 months ago (2014-06-08 00:02:24 UTC) #15
Vitaly Buka (NO REVIEWS)
6 years, 6 months ago (2014-06-08 00:04:19 UTC) #16
Message was sent while issue was closed.
On 2014/06/08 00:02:24, I haz the power (commit-bot) wrote:
> Change committed as 275713

Should compile with r275707
Re-applied with CQ. For some reason drover fails to revert r275706.

Powered by Google App Engine
This is Rietveld 408576698