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

Issue 2966233002: Omnibox UI Experiments: Strip trivial subdomains (Closed)

Created:
3 years, 5 months ago by tommycli
Modified:
3 years, 5 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Omnibox UI Experiments: Strip trivial subdomains This revised patch strips the trivial subdomains while preserving the registry and domain. It also correctly handles the wwww.foo.com (4 w's), which the previous version did not. Previous version: https://codereview.chromium.org/2939423003/ BUG=732582 Review-Url: https://codereview.chromium.org/2966233002 Cr-Commit-Position: refs/heads/master@{#484695} Committed: https://chromium.googlesource.com/chromium/src/+/92807e9faaff9f742a6f45c946f61931882408c7

Patch Set 1 #

Patch Set 2 : fix #

Patch Set 3 : make cast explicit for windows #

Total comments: 20

Patch Set 4 : merge #

Patch Set 5 : add comment #

Patch Set 6 : fix #

Total comments: 2

Patch Set 7 : address one more comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -6 lines) Patch
M components/omnibox/browser/autocomplete_match.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M components/omnibox/browser/autocomplete_match_unittest.cc View 1 2 3 4 5 4 chunks +17 lines, -2 lines 0 comments Download
M components/url_formatter/url_formatter.h View 1 chunk +3 lines, -0 lines 0 comments Download
M components/url_formatter/url_formatter.cc View 1 2 3 4 5 6 5 chunks +56 lines, -4 lines 0 comments Download
M components/url_formatter/url_formatter_unittest.cc View 1 2 3 4 5 2 chunks +75 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (24 generated)
tommycli
pkasting: PTAL - I think this version is a lot better than the old one. ...
3 years, 5 months ago (2017-07-05 17:04:48 UTC) #4
Peter Kasting
One substantive behavior concern. LGTM if I misunderstood how the code should work and it's ...
3 years, 5 months ago (2017-07-06 06:01:21 UTC) #19
tommycli
pkasting: Thanks! One pushback below (last one) https://codereview.chromium.org/2966233002/diff/40001/components/omnibox/browser/autocomplete_match_unittest.cc File components/omnibox/browser/autocomplete_match_unittest.cc (right): https://codereview.chromium.org/2966233002/diff/40001/components/omnibox/browser/autocomplete_match_unittest.cc#newcode114 components/omnibox/browser/autocomplete_match_unittest.cc:114: TEST(AutocompleteMatchTest, FormatUrlForSuggestionDisplay) ...
3 years, 5 months ago (2017-07-06 16:25:46 UTC) #20
Peter Kasting
LGTM! https://codereview.chromium.org/2966233002/diff/40001/components/url_formatter/url_formatter.cc File components/url_formatter/url_formatter.cc (right): https://codereview.chromium.org/2966233002/diff/40001/components/url_formatter/url_formatter.cc#newcode100 components/url_formatter/url_formatter.cc:100: offset += t.token().length() + 1; On 2017/07/06 16:25:46, ...
3 years, 5 months ago (2017-07-06 16:31:47 UTC) #23
tommycli
thanks! https://codereview.chromium.org/2966233002/diff/100001/components/url_formatter/url_formatter.cc File components/url_formatter/url_formatter.cc (right): https://codereview.chromium.org/2966233002/diff/100001/components/url_formatter/url_formatter.cc#newcode102 components/url_formatter/url_formatter.cc:102: transformed_subdomain + domain_and_registry; On 2017/07/06 16:31:47, Peter Kasting ...
3 years, 5 months ago (2017-07-06 17:24:59 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2966233002/120001
3 years, 5 months ago (2017-07-06 17:25:22 UTC) #27
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/92807e9faaff9f742a6f45c946f61931882408c7
3 years, 5 months ago (2017-07-06 18:55:28 UTC) #30
Mark P
On 2017/07/06 18:55:28, commit-bot: I haz the power wrote: > Committed patchset #7 (id:120001) as ...
3 years, 5 months ago (2017-07-06 19:05:16 UTC) #31
Peter Kasting
On 2017/07/06 19:05:16, Mark P wrote: > On 2017/07/06 18:55:28, commit-bot: I haz the power ...
3 years, 5 months ago (2017-07-06 23:51:10 UTC) #33
tommycli
On 2017/07/06 23:51:10, Peter Kasting wrote: > On 2017/07/06 19:05:16, Mark P wrote: > > ...
3 years, 5 months ago (2017-07-06 23:59:48 UTC) #34
Mark P
3 years, 5 months ago (2017-07-07 03:28:02 UTC) #35
Message was sent while issue was closed.
On 2017/07/06 23:59:48, tommycli wrote:
> On 2017/07/06 23:51:10, Peter Kasting wrote:
> > On 2017/07/06 19:05:16, Mark P wrote:
> > > On 2017/07/06 18:55:28, commit-bot: I haz the power wrote:
> > > > Committed patchset #7 (id:120001) as
> > > >
> > >
> >
>
https://chromium.googlesource.com/chromium/src/+/92807e9faaff9f742a6f45c946f6...
> > > 
> > > I might be blind, but how does this code handle the "wwww" case?  This
line
> in
> > > the test seems to imply it does not:
> > >   953        "http://wwww.google.com/",
> > > kFormatUrlExperimentalOmitTrivialSubdomains,
> > >   954        net::UnescapeRule::NORMAL, L"http://wwww.google.com/", 7},
> > 
> > "Handle" in this case means "don't touch", as opposed to the last patch that
> > erroneously converted "wwww.foo" to "w.foo" (or was it "wfoo"?).
> > 
> > This code successfully leaves "wwww." alone :)
> 
> It used to change it to http://wfoo.com, which was really bad. ;)

Ah, thanks for the clarification.

--mark

Powered by Google App Engine
This is Rietveld 408576698