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

Issue 896983003: Componentize ScoredHistoryMatch (Closed)

Created:
5 years, 10 months ago by sdefresne
Modified:
5 years, 10 months ago
Reviewers:
Mark P, sky
CC:
browser-components-watch_chromium.org, 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

Componentize ScoredHistoryMatch Change ScoredHistoryMatch to be a POD structure and introduce a new ScoredHistoryMatchBuilder to delegate the initialization of ScoredHistoryMatch to the embedder (mostly autocomplete code which is the sole client of that code). Move the ScoredHistoryMatch construction code into autocomple as it is the sole client of those values. Clean up chrome/browser/DEPS. BUG=374731, 374732 Committed: https://crrev.com/5677607ede1f589bc9bb67632de0542750f0855f Cr-Commit-Position: refs/heads/master@{#316487}

Patch Set 1 #

Patch Set 2 : Fix presubmit warnings #

Total comments: 2

Patch Set 3 : Re-upload with lower similarity threshold + rebase #

Patch Set 4 : Re-upload with lower similarity threshold + fix typo #

Patch Set 5 : Rename ScoredHistoryMatchBuilder to ScoredHistoryMatchBuilderImpl #

Total comments: 37

Patch Set 6 : Address comments #

Patch Set 7 : Rebase #

Total comments: 10

Patch Set 8 : Address comments #

Patch Set 9 : Use base::saturated_cast<> to convert from float to int #

Unified diffs Side-by-side diffs Delta from patch set Stats (+966 lines, -2256 lines) Patch
M chrome/browser/autocomplete/history_quick_provider.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/autocomplete/history_quick_provider.cc View 1 2 3 4 8 chunks +29 lines, -12 lines 0 comments Download
M chrome/browser/autocomplete/history_url_provider.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
A + chrome/browser/autocomplete/scored_history_match_builder_impl.h View 1 2 3 4 5 6 7 3 chunks +73 lines, -159 lines 0 comments Download
A + chrome/browser/autocomplete/scored_history_match_builder_impl.cc View 1 2 3 4 5 6 7 8 12 chunks +316 lines, -318 lines 0 comments Download
A + chrome/browser/autocomplete/scored_history_match_builder_impl_unittest.cc View 1 2 3 4 6 chunks +243 lines, -195 lines 0 comments Download
M chrome/browser/history/DEPS View 1 2 3 4 3 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/history/history_backend.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/history/history_service.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/history/history_service.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.h View 5 chunks +7 lines, -10 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.cc View 2 chunks +5 lines, -10 lines 0 comments Download
M chrome/browser/history/in_memory_url_index_unittest.cc View 1 2 3 4 25 chunks +117 lines, -103 lines 0 comments Download
D chrome/browser/history/scored_history_match.h View 1 chunk +0 lines, -208 lines 0 comments Download
D chrome/browser/history/scored_history_match.cc View 1 chunk +0 lines, -608 lines 0 comments Download
D chrome/browser/history/scored_history_match_unittest.cc View 1 chunk +0 lines, -423 lines 0 comments Download
M chrome/browser/history/url_index_private_data.h View 5 chunks +13 lines, -15 lines 0 comments Download
M chrome/browser/history/url_index_private_data.cc View 5 chunks +13 lines, -12 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M components/history.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M components/history/core/browser/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A + components/history/core/browser/scored_history_match.h View 1 2 3 4 5 6 7 3 chunks +64 lines, -164 lines 0 comments Download
A components/history/core/browser/scored_history_match.cc View 1 2 3 4 5 6 7 1 chunk +72 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (3 generated)
sdefresne
sky: can you review chrome/browser/history? mpearson: can you review chrome/browser/autocomplete? sky, mpearson: this is based ...
5 years, 10 months ago (2015-02-04 17:45:02 UTC) #2
Mark P
Can you reupload this in a form (git mv?) so that the code review site ...
5 years, 10 months ago (2015-02-04 19:32:26 UTC) #3
Mark P
On 2015/02/04 19:32:26, Mark P wrote: > Can you reupload this in a form (git ...
5 years, 10 months ago (2015-02-04 19:34:40 UTC) #4
Mark P
On 2015/02/04 19:34:40, Mark P wrote: > On 2015/02/04 19:32:26, Mark P wrote: > > ...
5 years, 10 months ago (2015-02-04 19:35:00 UTC) #5
Mark P
I looked at the interfaces. I'm okay with this approach for moving ScoredHistoryMatch to the ...
5 years, 10 months ago (2015-02-04 19:54:04 UTC) #6
sdefresne
I've tried to reupload with "git cl upload --find-copies --similarity=15" and I see that scored_history_match_builder.{cc,h} ...
5 years, 10 months ago (2015-02-05 10:51:28 UTC) #7
Mark P
On 2015/02/05 10:51:28, sdefresne wrote: > I've tried to reupload with "git cl upload --find-copies ...
5 years, 10 months ago (2015-02-05 16:47:25 UTC) #8
sky
On 2015/02/05 10:51:28, sdefresne wrote: > I've tried to reupload with "git cl upload --find-copies ...
5 years, 10 months ago (2015-02-05 17:21:54 UTC) #9
sdefresne
On 2015/02/05 at 17:21:54, sky wrote: > On 2015/02/05 10:51:28, sdefresne wrote: > > I've ...
5 years, 10 months ago (2015-02-06 13:35:46 UTC) #10
sky
On 2015/02/05 16:47:25, Mark P wrote: > On 2015/02/05 10:51:28, sdefresne wrote: > > I've ...
5 years, 10 months ago (2015-02-06 16:03:12 UTC) #11
sky
On 2015/02/06 13:35:46, sdefresne wrote: > On 2015/02/05 at 17:21:54, sky wrote: > > On ...
5 years, 10 months ago (2015-02-06 16:03:34 UTC) #12
sdefresne
Thank you. I've renamed ScoredHistoryMatchBuilder to ScoredHistoryMatchBuilderImpl. mpearson: can you do a review of the ...
5 years, 10 months ago (2015-02-06 17:11:33 UTC) #13
Mark P
generally fine; comments below https://codereview.chromium.org/896983003/diff/80001/chrome/browser/autocomplete/scored_history_match_builder_impl.cc File chrome/browser/autocomplete/scored_history_match_builder_impl.cc (right): https://codereview.chromium.org/896983003/diff/80001/chrome/browser/autocomplete/scored_history_match_builder_impl.cc#newcode9 chrome/browser/autocomplete/scored_history_match_builder_impl.cc:9: #include <algorithm> include vector (because ...
5 years, 10 months ago (2015-02-07 07:00:14 UTC) #14
sdefresne
Please take another look. https://codereview.chromium.org/896983003/diff/80001/chrome/browser/autocomplete/scored_history_match_builder_impl.cc File chrome/browser/autocomplete/scored_history_match_builder_impl.cc (right): https://codereview.chromium.org/896983003/diff/80001/chrome/browser/autocomplete/scored_history_match_builder_impl.cc#newcode9 chrome/browser/autocomplete/scored_history_match_builder_impl.cc:9: #include <algorithm> On 2015/02/07 at ...
5 years, 10 months ago (2015-02-09 10:01:14 UTC) #15
Mark P
lgtm baring minor comments below https://codereview.chromium.org/896983003/diff/120001/chrome/browser/autocomplete/scored_history_match_builder_impl.cc File chrome/browser/autocomplete/scored_history_match_builder_impl.cc (right): https://codereview.chromium.org/896983003/diff/120001/chrome/browser/autocomplete/scored_history_match_builder_impl.cc#newcode201 chrome/browser/autocomplete/scored_history_match_builder_impl.cc:201: if (!scored_history_match.url_matches.empty() && (terms.size()) ...
5 years, 10 months ago (2015-02-09 19:48:21 UTC) #16
Mark P
Hi, Can you give me an ETA on when this will be submitted. I have ...
5 years, 10 months ago (2015-02-13 22:27:28 UTC) #17
sdefresne
On 2015/02/13 at 22:27:28, mpearson wrote: > Hi, > > Can you give me an ...
5 years, 10 months ago (2015-02-14 19:14:47 UTC) #18
sdefresne
Thank you for the review. https://codereview.chromium.org/896983003/diff/120001/chrome/browser/autocomplete/scored_history_match_builder_impl.cc File chrome/browser/autocomplete/scored_history_match_builder_impl.cc (right): https://codereview.chromium.org/896983003/diff/120001/chrome/browser/autocomplete/scored_history_match_builder_impl.cc#newcode201 chrome/browser/autocomplete/scored_history_match_builder_impl.cc:201: if (!scored_history_match.url_matches.empty() && (terms.size()) ...
5 years, 10 months ago (2015-02-16 13:26:41 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/896983003/160001
5 years, 10 months ago (2015-02-16 15:24:18 UTC) #22
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 10 months ago (2015-02-16 16:08:15 UTC) #23
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/5677607ede1f589bc9bb67632de0542750f0855f Cr-Commit-Position: refs/heads/master@{#316487}
5 years, 10 months ago (2015-02-16 16:09:01 UTC) #24
Mark P
5 years, 10 months ago (2015-02-17 16:56:37 UTC) #25
Message was sent while issue was closed.
submitted patchset lgtm for the record

Powered by Google App Engine
This is Rietveld 408576698