New issue
Advanced search Search tips

Issue 759865 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Trivial subdomain elision is not being applied in some cases with private domains

Project Member Reported by shbarezer@chromium.org, Aug 28 2017

Issue description

App Version: 62.0.3196.0 canay
iOS Version: 10.3.3, 11
Device: iPhone
URL: blogspot.com

Precondition:
Go to :chrome://flags
Enable - Hide trivial subdomains in omnibox suggestions iOS

Steps to reproduce:
  1. Launch Google Chrome Canary
  2. Go to blogspot.com

Observed results: 
www. Subdomain is still shown in the omnibox suggestions (e.g. www.blogspot.com)

Expected results: 
www. Subdomain should not show in the omnibox suggestions (e.g . blogspot.com)

Number of times you were able to reproduce: 5/5
Bug reproducible after clean install: Yes
Bug reproducible after clearing cache and cookies: Yes
Bug reproducible on Chrome Mobile on Android: NA
Bug reproducible on Safari/Firefox: Firefox: NA, Safari: NA
Bug reproducible on current stable build (App Version, iOS Version): M60 Yes New feature
Bug reproducible on the current beta channel build (App Version, iOS Version): M61 Yes New feature

Link to video/image:
https://drive.google.com/a/google.com/file/d/0B3EcbqLuR5TLbnlMc0I4N0tlbk0/view

 
Owner: jdonnelly@chromium.org
Status: Assigned (was: Untriaged)
Thanks for the report. Does the other elision flag work (chrome://flags/#omnibox-ui-hide-suggestion-url-scheme)? Also, a few days ago you mentioned by email that these flags were working. Did they stop working? Or did you just mean that you saw the flags show up in the chrome://flags list?
1. I did not enable chrome://flags/#omnibox-ui-hide-suggestion-url-scheme flag while I have been testing chrome://flags/#Hide trivial subdomains in omnibox suggestions iOS flag.
Although, now even after enabling this flag as well, the issue with blogspot.com site is still there.
2. chrome://flags/#Hide trivial subdomains in omnibox suggestions iOS flag is working. This specific website is the only one that is behaving this way (I have gone through 101 Top sites). Other than that site and a few sites with "mobile." subdomain they were all fine, meaning the www. Subdomain has been removed from URL in the omnibox suggestions.
3. chrome://flags/#Hide trivial subdomains in omnibox suggestions iOS flag that I am testing did not stop to work, because as I mentioned, most of 101 Top sites are fine.

Please let me know if you need anymore information.





drive-by: jdonnelly@, I don't see any code to set the match in scheme, match in subdomain, match after host for navsuggestions coming from the server.  It doesn't look like Tommy touched that code at all for any of the UI experiments.
https://chromium.googlesource.com/chromium/src/+blame/9be3237d8dd87945c60c39404f19aece70fb37d1/components/omnibox/browser/search_provider.cc


Cc: -tommycli@chromium.org
Labels: OS-Android OS-Chrome OS-Linux OS-Mac OS-Windows
Owner: tommycli@chromium.org
Summary: URL elisions are not being applied to navsuggestions from the search provider (was: www. Subdomain is still shown in the omnibox suggestions.)
shbarezer: Thanks for the explanation. I didn't realize you meant specifically for that URL, I should have read your original report more carefully.

mpearson: Thanks, I think you've correctly identified the issue here.
Okay, yes, I can reproduce this and will look into fixing it.

I had made some changes to SearchSuggestionsParser, to elide the URLs, but it looks like that did not do the trick...

https://cs.chromium.org/chromium/src/components/omnibox/browser/search_suggestion_parser.cc?type=cs&q=search_suggestion_parser.cc&sq=package:chromium&l=282
After investigation, the problem is not with SearchProvider, but instead with private registries (blogspot.com, appspot.com).

The "www" was being interpreted as the domain (not a subdomain), and "blogspot.com" was interpreted as the registry (albeit a private one).

This CL fixes it by excluding private registries for the purposes of trivial subdomain stripping. https://chromium-review.googlesource.com/c/chromium/src/+/644491

Should be harmless since we're still only stripping "www" and "m".
Summary: Trivial subdomain elision is not being applied in some cases with private domains (was: URL elisions are not being applied to navsuggestions from the search provider)
Project Member

Comment 8 by bugdroid1@chromium.org, Aug 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/14b83d2a1be977527aec9136fbd65f8e7d02436f

commit 14b83d2a1be977527aec9136fbd65f8e7d02436f
Author: Tommy C. Li <tommycli@chromium.org>
Date: Wed Aug 30 23:11:53 2017

URL Formatter: Exclude private registries in trivial subdomain stripping

Previously, the URL formatter on "www.blogspot.com" would refuse to
strip "www", as "blogspot.com" was interpreted as the private registry,
and "www" was interpreted as the domain name.

Now we exclude private registry entries. This should be harmless, as
we still only strip "m" and "www" domains from private registries.

Bug:  759865 
Change-Id: Ibd176c6d3aa6b64391cfc112211613233c78f5f6
Reviewed-on: https://chromium-review.googlesource.com/644491
Reviewed-by: Justin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498657}
[modify] https://crrev.com/14b83d2a1be977527aec9136fbd65f8e7d02436f/components/url_formatter/url_formatter.cc
[modify] https://crrev.com/14b83d2a1be977527aec9136fbd65f8e7d02436f/components/url_formatter/url_formatter_unittest.cc

Status: Fixed (was: Assigned)
This should fix it. Thanks for the report, very helpful to catch the blogspot / appspot edge case here.
Labels: -Restrict-View-Google
We probably don't need to RVG it.

BTW shbarezer, does this feature work on iOS in general (other than this issue)?
Status: Verified (was: Fixed)
iOS in general, tested in safari - blogspot.com does not show www. subdomain, 
                          firefox - blogspot.com does not show www. subdomain

Also
Verified on 62.0.3202.0 canary on iPhone 6/7 iOS 10.3.3/11 
Looks good 
> After investigation, the problem is not with SearchProvider

This isn't true.  Filed  bug 761505  with a series of examples.

(I tried those examples on a top-of-tree build after the change listed comment #8 had landed.)

Sign in to add a comment