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

Issue 1155673002: Omnibox - Add About Flag to Reverse Title and URLs in the Dropdown (Closed)

Created:
5 years, 7 months ago by Mark P
Modified:
5 years, 7 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, James Su
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Omnibox - Add About Flag to Reverse Title and URLs in the Dropdown (under some conditions) Precisely, if the input is detected to be of type QUERY OR FORCED_QUERY, then it's likely that any (or at least most) URL suggestions we have have matches in the title. In this case, it's better to display the titles more prominently than the URLs in the omnibox dropdown. I've found this policy of flipping based entirely on the input type (not where the matches are) makes the omnibox look more consistent than a per-suggestion decision. Also, because inputs that are detected to be of type QUERY or FORCED_QUERY tend to keep their type classification as the user types, this also helps maintain a consistent presentation look in the omnibox. This is submitted as an about flag so other people can turn it on and experience this behavior. It's for getting feedback and iterating. BUG=338066 Committed: https://crrev.com/2a18bc7516b082cdd5d8a59b4f38d93cf76c27ac Cr-Commit-Position: refs/heads/master@{#331260}

Patch Set 1 #

Patch Set 2 : remove extra blank line #

Total comments: 16

Patch Set 3 : peter's comments, including refactoring #

Total comments: 4

Patch Set 4 : peter's comments, plus make tests compile #

Patch Set 5 : fix mac and add command line flag to histograms.xml #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -47 lines) Patch
M chrome/app/generated_resources.grd View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_controller.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autocomplete/autocomplete_provider_unittest.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/autocomplete/history_quick_provider.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/search_provider_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/omnibox/omnibox_edit_model.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/omnibox/autocomplete_match.h View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M components/omnibox/autocomplete_match.cc View 1 2 3 chunks +14 lines, -0 lines 0 comments Download
M components/omnibox/autocomplete_result.h View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download
M components/omnibox/autocomplete_result.cc View 1 2 3 1 chunk +9 lines, -7 lines 0 comments Download
M components/omnibox/autocomplete_result_unittest.cc View 1 2 3 17 chunks +29 lines, -29 lines 0 comments Download
M components/omnibox/omnibox_switches.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/omnibox/omnibox_switches.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 13 (3 generated)
Mark P
Hi Peter, Take a look at your leisure. thanks, mark
5 years, 7 months ago (2015-05-21 21:34:20 UTC) #2
Peter Kasting
LGTM with one substantive refactor suggestion https://codereview.chromium.org/1155673002/diff/20001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1155673002/diff/20001/chrome/app/generated_resources.grd#newcode7470 chrome/app/generated_resources.grd:7470: + Emphasize the ...
5 years, 7 months ago (2015-05-21 21:55:34 UTC) #3
Mark P
https://codereview.chromium.org/1155673002/diff/20001/chrome/browser/autocomplete/bookmark_provider.cc File chrome/browser/autocomplete/bookmark_provider.cc (right): https://codereview.chromium.org/1155673002/diff/20001/chrome/browser/autocomplete/bookmark_provider.cc#newcode227 chrome/browser/autocomplete/bookmark_provider.cc:227: match.PossiblySwapContentsAndDescriptionForURLSuggestion(input); On 2015/05/21 21:55:33, Peter Kasting wrote: > Rather ...
5 years, 7 months ago (2015-05-21 23:47:36 UTC) #4
Peter Kasting
https://codereview.chromium.org/1155673002/diff/20001/chrome/browser/autocomplete/bookmark_provider.cc File chrome/browser/autocomplete/bookmark_provider.cc (right): https://codereview.chromium.org/1155673002/diff/20001/chrome/browser/autocomplete/bookmark_provider.cc#newcode227 chrome/browser/autocomplete/bookmark_provider.cc:227: match.PossiblySwapContentsAndDescriptionForURLSuggestion(input); On 2015/05/21 23:47:36, Mark P wrote: > On ...
5 years, 7 months ago (2015-05-22 00:52:42 UTC) #5
Mark P
Refactored per your suggestion. Let me know what you think. If you're good with it, ...
5 years, 7 months ago (2015-05-22 22:51:29 UTC) #6
Peter Kasting
LGTM https://codereview.chromium.org/1155673002/diff/40001/components/omnibox/autocomplete_result.cc File components/omnibox/autocomplete_result.cc (right): https://codereview.chromium.org/1155673002/diff/40001/components/omnibox/autocomplete_result.cc#newcode166 components/omnibox/autocomplete_result.cc:166: for (ACMatches::const_iterator i(matches.begin()); i != matches.end(); ++i) { ...
5 years, 7 months ago (2015-05-22 23:39:37 UTC) #7
Mark P
I also fixed the tests. (The test changes were purely mechanical.) --mark https://codereview.chromium.org/1155673002/diff/40001/components/omnibox/autocomplete_result.cc File components/omnibox/autocomplete_result.cc ...
5 years, 7 months ago (2015-05-23 20:32:13 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155673002/80001
5 years, 7 months ago (2015-05-25 04:00:34 UTC) #11
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 7 months ago (2015-05-25 05:37:19 UTC) #12
commit-bot: I haz the power
5 years, 7 months ago (2015-05-25 05:38:50 UTC) #13
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/2a18bc7516b082cdd5d8a59b4f38d93cf76c27ac
Cr-Commit-Position: refs/heads/master@{#331260}

Powered by Google App Engine
This is Rietveld 408576698