New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 843361 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug
Team-Security-UX

Blocking:
issue 877186



Sign in to add a comment

When an IDN URL matches a top domain, show a "Did you mean to go to ..." UI

Project Member Reported by mea...@chromium.org, May 15 2018

Issue description

Currently, Chrome falls back to punycode for domains that are visually similar to top domains. Punycode is confusing, and the site is probably not where the user wanted to go to. It would be nice to suggest the user an alternate URL instead, preferably using the top domains list in url_formatter.

Screenshot: https://drive.google.com/file/d/1rCS-vt1xmsWdc2BGNAMsNVnzwlwSz4Nd/view
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 14 2018

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

commit a7152b867cade73f8f0270068170c872254065f8
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Thu Jun 14 20:57:47 2018

Move HSTS preload trie generation code to net/tools/huffman_trie

This CL moves the generic portions of the Huffman encoded HSTS trie to
a separate directory. This is in preparation for future work that will
reuse these bits to store the top domain list.

Bug: 843361
Change-Id: I9a715b3f0a1fd196df19de02696b3c7fb772be0a
Reviewed-on: https://chromium-review.googlesource.com/1097549
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Nick Harper <nharper@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567409}
[modify] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/BUILD.gn
[add] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/huffman_trie/BUILD.gn
[rename] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/huffman_trie/bit_writer.cc
[rename] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/huffman_trie/bit_writer.h
[rename] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/huffman_trie/bit_writer_unittest.cc
[rename] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/huffman_trie/huffman/huffman_builder.cc
[rename] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/huffman_trie/huffman/huffman_builder.h
[rename] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/huffman_trie/huffman/huffman_builder_unittest.cc
[rename] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/huffman_trie/trie/trie_bit_buffer.cc
[rename] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/huffman_trie/trie/trie_bit_buffer.h
[rename] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/huffman_trie/trie/trie_bit_buffer_unittest.cc
[modify] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/transport_security_state_generator/BUILD.gn
[modify] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/transport_security_state_generator/preloaded_state_generator.cc
[modify] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/transport_security_state_generator/trie/trie_writer.cc
[modify] https://crrev.com/a7152b867cade73f8f0270068170c872254065f8/net/tools/transport_security_state_generator/trie/trie_writer.h

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 21 2018

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

commit fbadab464cfe6a1b683d2a25dca6ef26f5e5019f
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Thu Jun 21 03:14:01 2018

Move common trie writing code to net/tools/huffman_trie

This CL generalizes and moves TrieWriter code from transport_security_state_generator to huffman_trie.
It makes TrieWriter an abstract class whose WriteEntry() method must be provided by its users.

Bug: 843361
Change-Id: Ib2f0b56c5eb3366086a8ade88ab226d89465da1c
Reviewed-on: https://chromium-review.googlesource.com/1101510
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Nick Harper <nharper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569135}
[modify] https://crrev.com/fbadab464cfe6a1b683d2a25dca6ef26f5e5019f/net/tools/huffman_trie/BUILD.gn
[add] https://crrev.com/fbadab464cfe6a1b683d2a25dca6ef26f5e5019f/net/tools/huffman_trie/trie/trie_writer.cc
[add] https://crrev.com/fbadab464cfe6a1b683d2a25dca6ef26f5e5019f/net/tools/huffman_trie/trie/trie_writer.h
[add] https://crrev.com/fbadab464cfe6a1b683d2a25dca6ef26f5e5019f/net/tools/huffman_trie/trie_entry.cc
[add] https://crrev.com/fbadab464cfe6a1b683d2a25dca6ef26f5e5019f/net/tools/huffman_trie/trie_entry.h
[modify] https://crrev.com/fbadab464cfe6a1b683d2a25dca6ef26f5e5019f/net/tools/transport_security_state_generator/BUILD.gn
[modify] https://crrev.com/fbadab464cfe6a1b683d2a25dca6ef26f5e5019f/net/tools/transport_security_state_generator/preloaded_state_generator.cc
[modify] https://crrev.com/fbadab464cfe6a1b683d2a25dca6ef26f5e5019f/net/tools/transport_security_state_generator/preloaded_state_generator.h
[modify] https://crrev.com/fbadab464cfe6a1b683d2a25dca6ef26f5e5019f/net/tools/transport_security_state_generator/transport_security_state_entry.cc
[modify] https://crrev.com/fbadab464cfe6a1b683d2a25dca6ef26f5e5019f/net/tools/transport_security_state_generator/transport_security_state_entry.h
[delete] https://crrev.com/de0c49b238dcabf732aba7d32de1d3195015ccd0/net/tools/transport_security_state_generator/trie/trie_writer.cc
[delete] https://crrev.com/de0c49b238dcabf732aba7d32de1d3195015ccd0/net/tools/transport_security_state_generator/trie/trie_writer.h

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 22 2018

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

commit 108257c71daa2d3d5ad78494b1f6cac01fcbe5fa
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Fri Jun 22 20:49:13 2018

Move preloaded data decoding code to net/extras/preload_data

This CL moves decoding code for preloaded data (e.g. HSTS) under net/extras/preload_data so that it can be reused.

A future CL will use the net::extras::PreloadDecoder class to extract top 10K domain information from a preloaded data set.

Bug: 843361
Change-Id: I3026feaa9034f9c5d09232ea1d43cf1e69c48939
Reviewed-on: https://chromium-review.googlesource.com/1098311
Reviewed-by: Nick Harper <nharper@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569762}
[modify] https://crrev.com/108257c71daa2d3d5ad78494b1f6cac01fcbe5fa/net/BUILD.gn
[add] https://crrev.com/108257c71daa2d3d5ad78494b1f6cac01fcbe5fa/net/extras/preload_data/decoder.cc
[add] https://crrev.com/108257c71daa2d3d5ad78494b1f6cac01fcbe5fa/net/extras/preload_data/decoder.h
[modify] https://crrev.com/108257c71daa2d3d5ad78494b1f6cac01fcbe5fa/net/http/transport_security_state.cc
[modify] https://crrev.com/108257c71daa2d3d5ad78494b1f6cac01fcbe5fa/net/tools/transport_security_state_generator/README.md

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 3

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

commit 9e93f9821f9fa0611d345710a55e694d8ec7234e
Author: git-meacer.google.com <meacer@google.com>
Date: Tue Jul 03 00:33:05 2018

Use a huffman trie for top domain storage in url formatter

UrlFormatter uses ICU's spoof checker to determine lookalike domains that contain unicode confusables. It does this by extracting a skeleton string from the given domain representing its visual appearance. For example, google.com and googlé[.]com have the same skeleton string (google.corn).

In addition to this, we want to display a "Did you mean to go to..." UI for navigations involving IDN if the domain name matches a top 10K domain. In order to do that, we need to store the domains associated with ICU skeletons.

UrlFormatter currently uses a DAFSA to store the list of the skeletons of the top 10K domains. It doesn't and cannot store the actual domain in this list. To support this, this CL changes the underlying storage from DAFSA to the Huffman Trie used by net's preload list code.

It
- Generates the huffman trie from top domain list during compile time.
- Decodes the huffman trie during runtime in IDNSpoofChecker::SimilarToTopDomains.

The design doc for the preload list migration is here: https://docs.google.com/document/d/11rqIozUDaK6DvNeu436SL3Coj65J5vhD9HVftOi-RrA/edit

As mentioned in the doc, micro benchmarks indicate that the binary size and speed is minimally impacted by this change (51KB additional size, 4 microseconds of additional time for each lookup).

Bug: 843361
Change-Id: If98b8161bf836fec6ba74e68587bd2159f4eb3d5
Reviewed-on: https://chromium-review.googlesource.com/1106539
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Nick Harper <nharper@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572055}
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/BUILD.gn
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/idn_spoof_checker.cc
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/idn_spoof_checker.h
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/top_domains/BUILD.gn
[add] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/top_domains/alexa_domains.skeletons
[rename] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/top_domains/make_top_domain_skeletons.cc
[add] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/top_domains/test_domains.skeletons
[add] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/top_domains/top_domain_generator.cc
[add] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/top_domains/top_domain_state_generator.cc
[add] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/top_domains/top_domain_state_generator.h
[add] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/top_domains/top_domains_trie.template
[add] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/top_domains/trie_entry.cc
[add] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/top_domains/trie_entry.h
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/components/url_formatter/url_formatter_unittest.cc
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/net/BUILD.gn
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/net/extras/preload_data/decoder.cc
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/net/extras/preload_data/decoder.h
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/net/tools/huffman_trie/BUILD.gn
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/net/tools/huffman_trie/trie/trie_writer.cc
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/net/tools/huffman_trie/trie/trie_writer.h
[modify] https://crrev.com/9e93f9821f9fa0611d345710a55e694d8ec7234e/net/tools/huffman_trie/trie_entry.h

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 10

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

commit 7d8c106e11f7506dec000e710d2daa393e4e513e
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Tue Jul 10 23:14:56 2018

Remove unused file from url_formatter/top_domains

Bug: 843361
Change-Id: I824aa69e64565bb6f05204df3b2ad65a86889c91
Reviewed-on: https://chromium-review.googlesource.com/1132454
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573972}
[delete] https://crrev.com/2ebe2e72ddf3bb1ea2473c8ceb77c76e0d51fa91/components/url_formatter/top_domains/alexa_skeletons.gperf

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 23

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

commit 9f16991bd8d76cd5019cc143d7c06bd907ef5d7f
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Mon Jul 23 22:40:13 2018

Add a "Did you mean to go to..." UI for IDN navigations

This CL adds an infobar for navigation suggestions for IDN URLs that match top domains. The match between the navigated and the suggested domain is made using the ICU skeletons of top domains list in url_formatter.

This UI is disabled by default and can be enabled via the IDNNavigationSuggestions feature flag via chrome://flags.

Screenshot: https://drive.google.com/open?id=1QloUKbwYIE7QlPX_NRY3Yljt9ZkwtO-S

Change-Id: I317a143d363d2a4830ee511f03ede0966312bb57
Bug: 843361
Reviewed-on: https://chromium-review.googlesource.com/1110945
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577309}
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/about_flags.cc
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/infobars/infobars_browsertest.cc
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
[add] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/ui/omnibox/idn_navigation_observer.cc
[add] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/ui/omnibox/idn_navigation_observer.h
[add] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/ui/omnibox/idn_navigation_observer_browsertest.cc
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/browser/ui/tab_helpers.cc
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/common/chrome_features.cc
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/common/chrome_features.h
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/chrome/test/BUILD.gn
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/components/url_formatter/idn_spoof_checker.cc
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/components/url_formatter/idn_spoof_checker.h
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/components/url_formatter/url_formatter.cc
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/components/url_formatter/url_formatter.h
[modify] https://crrev.com/9f16991bd8d76cd5019cc143d7c06bd907ef5d7f/tools/metrics/histograms/enums.xml

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 2

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

commit df685b92ad6e7831493a33eabfc0d66d66dc2559
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Thu Aug 02 21:13:02 2018

Add metrics for IDN navigation suggestions

This is a followup to crrev.com/1097549.

Bug: 843361
Change-Id: Ifed5b3aaff5a4312e7302904c28955232f125a7c
Reviewed-on: https://chromium-review.googlesource.com/1155758
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580320}
[modify] https://crrev.com/df685b92ad6e7831493a33eabfc0d66d66dc2559/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
[modify] https://crrev.com/df685b92ad6e7831493a33eabfc0d66d66dc2559/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h
[modify] https://crrev.com/df685b92ad6e7831493a33eabfc0d66d66dc2559/chrome/browser/ui/omnibox/idn_navigation_observer.cc
[modify] https://crrev.com/df685b92ad6e7831493a33eabfc0d66d66dc2559/chrome/browser/ui/omnibox/idn_navigation_observer.h
[modify] https://crrev.com/df685b92ad6e7831493a33eabfc0d66d66dc2559/chrome/browser/ui/omnibox/idn_navigation_observer_browsertest.cc
[modify] https://crrev.com/df685b92ad6e7831493a33eabfc0d66d66dc2559/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/df685b92ad6e7831493a33eabfc0d66d66dc2559/tools/metrics/histograms/histograms.xml

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 13

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

commit 8a9a99f1c29a68370b3d479efc439d8511c9bdb8
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Mon Aug 13 20:46:07 2018

Don't show a lookalike navigation suggestion if the user has engaged with the navigated site before

Chrome displays a navigation suggestion for sites that are lookalikes of popular sites (1), or sites that the user has engaged before (2). As an example for (1): if the user visits https://googlé[.]com, Chrome will display "Did you mean to go to https://google.com".

This CL prevents showing this UI if the user engaged with the lookalike domain in the past. In the example above, Chrome will not display a "Did you mean to go to https://google.com" if the user has a site engagement score for googlé.com.

Bug: 843361
Change-Id: I583da6de071b86026e3f75ea727e33ef635beb6e
Reviewed-on: https://chromium-review.googlesource.com/1167981
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582694}
[modify] https://crrev.com/8a9a99f1c29a68370b3d479efc439d8511c9bdb8/chrome/browser/ui/omnibox/idn_navigation_observer.cc
[modify] https://crrev.com/8a9a99f1c29a68370b3d479efc439d8511c9bdb8/chrome/browser/ui/omnibox/idn_navigation_observer.h
[modify] https://crrev.com/8a9a99f1c29a68370b3d479efc439d8511c9bdb8/chrome/browser/ui/omnibox/idn_navigation_observer_browsertest.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 23

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

commit 9279c680195fb6342b5ed447d387f18aaf474038
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Thu Aug 23 01:45:55 2018

Add a feature parameter to disable UI for IDN navigation suggestions

This CL adds a "metrics_only" parameter to IdnNavigationSuggestions feature. When set to "true",
the parameter will suppress the display of the "Did you mean to go to ..." UI and only
record metrics.

Bug: 843361,847662
Change-Id: Idb72225ff0fc2f011bd2c1ae5bb0ee7167d687ba
Reviewed-on: https://chromium-review.googlesource.com/1182123
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585360}
[modify] https://crrev.com/9279c680195fb6342b5ed447d387f18aaf474038/chrome/browser/about_flags.cc
[modify] https://crrev.com/9279c680195fb6342b5ed447d387f18aaf474038/chrome/browser/ui/omnibox/idn_navigation_observer.cc
[modify] https://crrev.com/9279c680195fb6342b5ed447d387f18aaf474038/chrome/browser/ui/omnibox/idn_navigation_observer_browsertest.cc

Blocking: 877186
Project Member

Comment 11 by bugdroid1@chromium.org, Aug 29

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

commit 137dc8bc3bed0cbdde708372c4f97aa3732946db
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Wed Aug 29 20:38:13 2018

Rename IdnNavigationSuggestions feature to LookalikeUrlNavigationSuggestions

Also rename any related classes. In the future we might show suggestions for
non-IDN navigations as well, this is to prepare for that.

Bug: 843361,847662
Change-Id: Id614decdc1b108923d6934c66b99274a2477e0a3
Reviewed-on: https://chromium-review.googlesource.com/1187227
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587283}
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/browser/about_flags.cc
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h
[rename] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/browser/ui/omnibox/lookalike_url_navigation_observer.cc
[rename] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/browser/ui/omnibox/lookalike_url_navigation_observer.h
[rename] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/browser/ui/omnibox/lookalike_url_navigation_observer_browsertest.cc
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/browser/ui/tab_helpers.cc
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/common/chrome_features.cc
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/common/chrome_features.h
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/chrome/test/BUILD.gn
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/137dc8bc3bed0cbdde708372c4f97aa3732946db/tools/metrics/histograms/histograms.xml

Project Member

Comment 12 by bugdroid1@chromium.org, Aug 30

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

commit 2f6426aee3db734ba341f6f866369f75197f3fcb
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Thu Aug 30 21:15:13 2018

Use the correct navigation event when checking for lookalike URL suggestions

The current code uses NavigationEntryCommitted, but it should have used
DidNavigationFinish instead.

Bug: 843361, 847662
Change-Id: Ie16016844e636a14c2114450a6e3b2a94cd2529b
Reviewed-on: https://chromium-review.googlesource.com/1197083
Reviewed-by: Tommy Li <tommycli@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587767}
[modify] https://crrev.com/2f6426aee3db734ba341f6f866369f75197f3fcb/chrome/browser/ui/omnibox/lookalike_url_navigation_observer.cc
[modify] https://crrev.com/2f6426aee3db734ba341f6f866369f75197f3fcb/chrome/browser/ui/omnibox/lookalike_url_navigation_observer.h
[modify] https://crrev.com/2f6426aee3db734ba341f6f866369f75197f3fcb/chrome/browser/ui/omnibox/lookalike_url_navigation_observer_browsertest.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Dec 20

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

commit 17cbe8c89bdb245f010936f6b79a769f6298695e
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Thu Dec 20 23:02:37 2018

Lookalike URLs: Do not trigger when the eTLD+1 of the navigated domain is not IDN

The top domain heuristic incorrectly marks certain domains as lookalikes, despite the fact that the domain itself is a top domain.
As a result of this bug, tést[.]blogspot[.]com displays a "Did you mean to go to blogspot.com".

This happens because:
- We currently use INCLUDE_PRIVATE_REGISTRIES flag when computing eTLD+1s via net::registry_controlled_domains::GetDomainAndRegistry.
- This results in the eTLD+1 of "tést[.]blogspot[.]com" being computed as "tést[.]blogspot[.]com" instead of just "blogspot[.]com".
- Since the eTLD+1 contains IDN, we perform the top domain skeleton check.
- This check compares "tést[.]blogspot[.]com" against top domains and finds "blogspot[.]com" as a match.
- This in turn records metrics and shows the UI.

This CL excludes private registries in eTLD+1 computation. As a result, eTLD+1 of private registries will exclude the subdomain, e.g. eTLD+1 of "tést[.]blogspot[.]com" will now be computed as "blogspot[.]com". Since the new eTLD+1 does not have IDN, it will not trigger any further checks and the navigation will not be treated as a lookalike.

Bug: 843361
Change-Id: Iaec1a0af61fa7aa9a2091bff3212171ba36034ad
Reviewed-on: https://chromium-review.googlesource.com/c/1387670
Reviewed-by: Tommy Li <tommycli@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618367}
[modify] https://crrev.com/17cbe8c89bdb245f010936f6b79a769f6298695e/chrome/browser/ui/omnibox/lookalike_url_navigation_observer.cc
[modify] https://crrev.com/17cbe8c89bdb245f010936f6b79a769f6298695e/chrome/browser/ui/omnibox/lookalike_url_navigation_observer_browsertest.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Dec 21

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

commit 8ffb4422d0bae5984803487f5ad1cbd7a720ad1b
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Fri Dec 21 21:44:48 2018

Lookalike URLs: Ignore URLs that are not HTTP or HTTPS

This CL fixes the case where the lookalike URL heuristics are triggered for non-web URLs such as chrome:// schemes. It also converts test cases to use non-private domains.

Bug: 843361
Change-Id: I2cb7cdc975ba330d547b604ba4fc9fe8c45969a6
Reviewed-on: https://chromium-review.googlesource.com/c/1388562
Reviewed-by: Tommy Li <tommycli@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618611}
[modify] https://crrev.com/8ffb4422d0bae5984803487f5ad1cbd7a720ad1b/chrome/browser/ui/omnibox/lookalike_url_navigation_observer.cc
[modify] https://crrev.com/8ffb4422d0bae5984803487f5ad1cbd7a720ad1b/chrome/browser/ui/omnibox/lookalike_url_navigation_observer_browsertest.cc

Sign in to add a comment