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

Issue 2846673006: Omnibox: Make InMemoryURLIndex respect hidden URLRows (Closed)

Created:
3 years, 7 months ago by tommycli
Modified:
3 years, 7 months ago
CC:
chromium-reviews, jdonnelly+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Omnibox: Make InMemoryURLIndex respect hidden URLRows When HistoryBackend records a new page visit, it creates a new URLRow, which is marked "hidden" if it has only been visited by subframes. URLDatabase records these "hidden" URLRows, but explicitly excludes them from the results of URLDatabase::AutocompleteForPrefix. InMemoryURLIndex, however, ignores the "hidden" flag. This causes HistoryQuickProvider to return autocompletions that have never been visited in the main frame before. This CL prevents "hidden" URLRows from entering the InMemoryURLIndex's index. It prevents HistoryQuickProvider from returning completions that have never been visited in the main frame. This fix works for both on-the-fly visits, as well as restoring from on-disk URLDatabase on startup. One thing to note is that even "hidden" (i.e. subframe) visits are counted as part of the visit count for URLRows. This seems wrong, since those visits didn't affect the URL of the Omnibox, and seem more like internal page state. However, changing that is beyond the scope of this CL. BUG=711772 Review-Url: https://codereview.chromium.org/2846673006 Cr-Commit-Position: refs/heads/master@{#470019} Committed: https://chromium.googlesource.com/chromium/src/+/121980770b3b9c81971b1277180e303c64905c1c

Patch Set 1 #

Total comments: 2

Patch Set 2 : address nit #

Patch Set 3 : change approach #

Patch Set 4 : update comment #

Patch Set 5 : fix #

Patch Set 6 : change approach #

Total comments: 8

Patch Set 7 : address mpearson comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -2 lines) Patch
M components/history/core/browser/url_database.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M components/history/core/browser/url_database.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M components/omnibox/browser/in_memory_url_index_unittest.cc View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 2 comments Download

Messages

Total messages: 61 (31 generated)
tommycli
pkasting: PTAL This CL seems to fix it, but I'm not completely sure, since the ...
3 years, 7 months ago (2017-04-28 00:05:02 UTC) #2
tommycli
On 2017/04/28 00:05:02, tommycli wrote: > pkasting: PTAL > > This CL seems to fix ...
3 years, 7 months ago (2017-04-28 00:05:09 UTC) #3
tommycli
On 2017/04/28 00:05:09, tommycli wrote: > On 2017/04/28 00:05:02, tommycli wrote: > > pkasting: PTAL ...
3 years, 7 months ago (2017-04-28 00:29:23 UTC) #4
Peter Kasting
LGTM. I expect Mark will want to weigh in on this, but it matches what ...
3 years, 7 months ago (2017-04-28 06:02:14 UTC) #5
tommycli
mpearson: PTAL, as pkasting suggested you'd want to weigh in... thanks! https://codereview.chromium.org/2846673006/diff/1/components/omnibox/browser/history_quick_provider_unittest.cc File components/omnibox/browser/history_quick_provider_unittest.cc (right): ...
3 years, 7 months ago (2017-04-28 15:44:12 UTC) #7
Mark P
not lgtm This change is problematic as written. By marking this match as not allowed ...
3 years, 7 months ago (2017-04-28 17:03:15 UTC) #10
tommycli
On 2017/04/28 17:03:15, Mark P wrote: > not lgtm > > This change is problematic ...
3 years, 7 months ago (2017-04-28 18:42:26 UTC) #13
tommycli
On 2017/04/28 18:42:26, tommycli wrote: > On 2017/04/28 17:03:15, Mark P wrote: > > not ...
3 years, 7 months ago (2017-04-28 18:43:11 UTC) #14
Justin Donnelly
On 2017/04/28 18:43:11, tommycli wrote: > > mpearson: Exclude any URLs that have never appeared ...
3 years, 7 months ago (2017-04-28 19:49:18 UTC) #15
tommycli
mpearson: PTAL again. This one filters out subframe and keyword generated visits (which have never ...
3 years, 7 months ago (2017-04-28 22:59:13 UTC) #20
Mark P
On 2017/04/28 22:59:13, tommycli wrote: > mpearson: PTAL again. This one filters out subframe and ...
3 years, 7 months ago (2017-05-01 19:38:29 UTC) #25
tommycli
On 2017/05/01 19:38:29, Mark P wrote: > On 2017/04/28 22:59:13, tommycli wrote: > > mpearson: ...
3 years, 7 months ago (2017-05-02 18:05:57 UTC) #29
tommycli
side note: https://codereview.chromium.org/2846673006/diff/100001/components/history/core/browser/url_database.cc File components/history/core/browser/url_database.cc (right): https://codereview.chromium.org/2846673006/diff/100001/components/history/core/browser/url_database.cc#newcode643 components/history/core/browser/url_database.cc:643: return false; A side note, this is ...
3 years, 7 months ago (2017-05-02 18:09:34 UTC) #30
tommycli
mpearson: ping, thanks!
3 years, 7 months ago (2017-05-03 15:28:54 UTC) #31
Mark P
https://codereview.chromium.org/2846673006/diff/100001/components/history/core/browser/url_database.cc File components/history/core/browser/url_database.cc (right): https://codereview.chromium.org/2846673006/diff/100001/components/history/core/browser/url_database.cc#newcode640 components/history/core/browser/url_database.cc:640: bool RowQualifiesAsSignificant(const URLRow& row, While you're here, can you ...
3 years, 7 months ago (2017-05-03 19:04:49 UTC) #32
Mark P
I like this approach a lot better. I have two questions remaining: * Did you ...
3 years, 7 months ago (2017-05-03 19:04:56 UTC) #33
tommycli
Thanks! I'll send another email with replies to your general comments. https://codereview.chromium.org/2846673006/diff/100001/components/history/core/browser/url_database.cc File components/history/core/browser/url_database.cc (right): ...
3 years, 7 months ago (2017-05-03 19:24:59 UTC) #37
tommycli
On 2017/05/03 19:04:56, Mark P wrote: > I like this approach a lot better. > ...
3 years, 7 months ago (2017-05-03 19:26:38 UTC) #38
Mark P
lgtm I agree with you on the visit_count issue. Let's leave it to Peter, when ...
3 years, 7 months ago (2017-05-03 19:49:20 UTC) #41
tommycli
On 2017/05/03 19:49:20, Mark P wrote: > lgtm > > I agree with you on ...
3 years, 7 months ago (2017-05-03 20:28:48 UTC) #44
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/2846673006/120001
3 years, 7 months ago (2017-05-03 20:29:38 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/426704)
3 years, 7 months ago (2017-05-03 20:41:35 UTC) #49
tommycli
sdefresne: PTAL OWNERS stamp needed, thanks!
3 years, 7 months ago (2017-05-03 20:45:15 UTC) #51
sdefresne
lgtm
3 years, 7 months ago (2017-05-04 12:37:35 UTC) #52
Peter Kasting
LGTM Considering whether "hidden visits" should not be counted anywhere for omnibox scoring: the main ...
3 years, 7 months ago (2017-05-04 19:17:36 UTC) #53
tommycli
thank you all! https://codereview.chromium.org/2846673006/diff/120001/components/omnibox/browser/in_memory_url_index_unittest.cc File components/omnibox/browser/in_memory_url_index_unittest.cc (right): https://codereview.chromium.org/2846673006/diff/120001/components/omnibox/browser/in_memory_url_index_unittest.cc#newcode493 components/omnibox/browser/in_memory_url_index_unittest.cc:493: EXPECT_EQ(0U, url_index_ On 2017/05/04 19:17:36, Peter ...
3 years, 7 months ago (2017-05-08 15:44:45 UTC) #54
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/2846673006/120001
3 years, 7 months ago (2017-05-08 15:45:31 UTC) #56
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/121980770b3b9c81971b1277180e303c64905c1c
3 years, 7 months ago (2017-05-08 16:52:12 UTC) #59
Mark P
On 2017/05/04 19:17:36, Peter Kasting wrote: > LGTM > > Considering whether "hidden visits" should ...
3 years, 7 months ago (2017-05-08 18:10:36 UTC) #60
Peter Kasting
3 years, 7 months ago (2017-05-08 19:23:20 UTC) #61
Message was sent while issue was closed.
On 2017/05/08 18:10:36, Mark P wrote:
> On 2017/05/04 19:17:36, Peter Kasting wrote:
> > Considering whether "hidden visits" should not be counted anywhere for
omnibox
> > scoring: the main thing I'd think this might affect is stuff like youtube,
> maps,
> > etc. that gets embedded into other sites a lot.  It might be nice to (not
> > inline) autocomplete an embedded YT video in the same way we can
autocomplete
> a
> > link-clicked site (but, again, we won't inline-autocomplete it).  So my
ideal
> > solution would probably be one that does not exclude these sorts of visits,
> but
> > rather counts them differently, in the same way we already distinguish
between
> > typed and untyped visits.
> 
> (For the record, I disagree with your statement here.  I think it's
appropriate
> to never suggest a URL and title the user will not recognize.  If the URL
never
> appeared in the omnibox and the title never appeared as a tab strip title,
> displaying one of these anywhere in the dropdown is likely to be surprising.)

My assumption was that the URL and title might be familiar despite not appearing
in those places.  For example, if I watch an embedded video about XYZ on site
ABC, then "XYZ" could be familiar despite me having seen only "ABC" as a tab
title.

> My question was about pages that have both hidden and not-hidden visits.
> For example, if a user sees an embedded youtube video, then clicks on a link
> to the full http://youtube.com page for that video.  For these pages, should
we be
> scoring them counting all their visits or only all their non-hidden visits?

Right, I was trying to answer that question.  I'm sorry my answer was not
clearly an answer to that question :).

I think they should be counted, but not counted the same way as a normal visit. 
So basically, neither of your answers.

I think if they counted separately and could be weighted separately, we could
eliminate the need for "filter sites that only have hidden visits" because such
sites would be more low-ranked (and not inline-autocompleting) by default.  Even
a naive method of e.g. treating each "hidden visit" as, say, 1/3rd of a normal
visit could help.

But I don't feel confident enough about this to file a bug or care how we pursue
it.

> > I also think it's important that we follow up on Mark's comment that there's
> > significant HQP position 0 use for untyped URLs, especially since our
instinct
> > was that this wasn't (and shouldn't be) happening.  I am worried that even
if
> > inline AC for untyped URLs is good on net in this case, we may still want to
> > remove it because the downside of surprising, annoying behavior is
> > psychologically greater than the upside of helpful bootstrapping of
> completions.
> > But in any case, I would be sad if that got dropped on the floor without
> > further investigation.
> 
> I think this behavior (inlining things with typed_count = 0) is likely
> reasonable,
> and probably not surprising else we would've heard about it sometime.
> (Recall that we still only inline-autocomplete prefix matches, even if they
> come from the HQP.)
> 
> If you feel strongly, you can file a bug to investigate it.

This one I do feel strongly about.  Filed
https://bugs.chromium.org/p/chromium/issues/detail?id=719657 .

> I think we probably would've heard at least
> one
> anecdotal complaint if inline autocompletion for URLs was too aggressive.

I am suspicious of this reasoning.  We hear lots of anecdotal complaints that
people want to turn off inline autocompletion in general; I got one just this
morning, for example.  I don't think users' mental granularity is sufficient to
complain more precisely than that.

> I'd also ignore it for a while since HQP scoring is so much in flux right now
> anyway.

That is fair.

Powered by Google App Engine
This is Rietveld 408576698