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

Issue 53283004: Adding support for forced URLs to TopSites. (Closed)

Created:
7 years, 1 month ago by beaudoin
Modified:
7 years, 1 month ago
CC:
chromium-reviews, browser-components-watch_chromium.org
Visibility:
Public.

Description

Adding support for forced URLs to TopSites. This CL makes it possible to add MostVisitedURLs to TopSites that have a non-null |last_forced_time| indicating that these URLs are "forced" and should stay in top-sites even as other non-forced URLs come in. These forced URLs are evicted on a Least Recently Used basis based on |last_forced_time|. Internally, the list of Forced URLs is kept at the beginning of the TopSitesCache list of MostVisitedURLs. These forced URLs are not returned by GetMostVisitedURLs. Forced URLs make it possible for Chrome to capture thumbnails of sites that may have been suggested through other processes than the TopSitesBackend. They are not used yet but a soon-to-follow CL will link them to thumbnails requested via the chrome-search://thumb2/... TBR'ing owners for minor API change. BUG= TBR=bulach@chromium.org,sky@chromium.org,darin@chromium.org,benwells@chromium.org,estade@chromium.org, Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=234394

Patch Set 1 #

Patch Set 2 : Added TopSitesCache unit tests. #

Patch Set 3 : Rebased. #

Patch Set 4 : Fixed DiffMostVisited. #

Patch Set 5 : Added test to ensure forced URLs are stored to the DB. #

Patch Set 6 : Fixed bug. #

Patch Set 7 : Corrected minor spacing problem. #

Total comments: 19

Patch Set 8 : Answered Brett's comments. #

Patch Set 9 : Removed GetAllMostVisited. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+646 lines, -81 lines) Patch
M chrome/browser/android/most_visited_sites.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autocomplete/zero_suggest_provider.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/automation/automation_provider_observers.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/top_sites/top_sites_api.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/top_sites/top_sites_apitest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/history/top_sites.h View 1 2 3 4 5 6 7 8 2 chunks +16 lines, -11 lines 0 comments Download
M chrome/browser/history/top_sites_cache.h View 1 2 3 4 5 6 7 4 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/history/top_sites_cache.cc View 1 2 3 4 5 6 7 2 chunks +26 lines, -0 lines 0 comments Download
M chrome/browser/history/top_sites_cache_unittest.cc View 1 2 3 4 5 6 7 4 chunks +25 lines, -5 lines 0 comments Download
M chrome/browser/history/top_sites_database.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/history/top_sites_database_unittest.cc View 1 2 3 4 5 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/history/top_sites_impl.h View 1 2 3 4 5 6 7 8 6 chunks +35 lines, -11 lines 0 comments Download
M chrome/browser/history/top_sites_impl.cc View 1 2 3 4 5 6 7 8 16 chunks +135 lines, -27 lines 0 comments Download
M chrome/browser/history/top_sites_impl_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +371 lines, -10 lines 0 comments Download
M chrome/browser/jumplist_win.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search/instant_service.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/thumbnails/thumbnail_service_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/thumbnails/thumbnail_service_unittest.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/global_history_menu.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/global_menu_bar_x11.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/most_visited_handler.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/thumbnail_list_source.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
beaudoin
Hi Brett, This is the first follow-up CL to my recent change in the TopSites ...
7 years, 1 month ago (2013-10-31 19:20:23 UTC) #1
beaudoin
Added the TopSitesCache unit test, this CL is now fully ready for review I believe. ...
7 years, 1 month ago (2013-10-31 20:35:40 UTC) #2
beaudoin
On 2013/10/31 20:35:40, beaudoin wrote: > Added the TopSitesCache unit test, this CL is now ...
7 years, 1 month ago (2013-11-06 14:46:41 UTC) #3
brettw
A few minor comments, I'm checking the logic now. https://codereview.chromium.org/53283004/diff/390001/chrome/browser/history/top_sites.h File chrome/browser/history/top_sites.h (right): https://codereview.chromium.org/53283004/diff/390001/chrome/browser/history/top_sites.h#newcode74 chrome/browser/history/top_sites.h:74: ...
7 years, 1 month ago (2013-11-08 22:56:07 UTC) #4
brettw
LGTM https://codereview.chromium.org/53283004/diff/390001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/53283004/diff/390001/chrome/browser/history/top_sites_impl.cc#newcode440 chrome/browser/history/top_sites_impl.cc:440: int oldRank = found->second >= nb_old_forced ? Style: ...
7 years, 1 month ago (2013-11-08 23:14:58 UTC) #5
beaudoin
Hi Brett, Answered your comments save for the one about possibly renaming the function. I'm ...
7 years, 1 month ago (2013-11-11 21:58:08 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaudoin@chromium.org/53283004/470001
7 years, 1 month ago (2013-11-11 21:59:10 UTC) #7
brettw
https://codereview.chromium.org/53283004/diff/390001/chrome/browser/history/top_sites.h File chrome/browser/history/top_sites.h (right): https://codereview.chromium.org/53283004/diff/390001/chrome/browser/history/top_sites.h#newcode75 chrome/browser/history/top_sites.h:75: virtual void GetAllMostVisitedURLs( 8 doesn't sound like many to ...
7 years, 1 month ago (2013-11-11 22:03:30 UTC) #8
beaudoin1
You know what, I'll do it right away and TBR. On Mon, Nov 11, 2013 ...
7 years, 1 month ago (2013-11-11 22:05:19 UTC) #9
beaudoin
TBRing owners for a trivial API change to TopSites::GetMostVisited(...) recommended by brettw@
7 years, 1 month ago (2013-11-11 22:28:37 UTC) #10
beaudoin
Typo to darin's email.
7 years, 1 month ago (2013-11-11 22:29:49 UTC) #11
darin (slow to review)
OK, LGTM
7 years, 1 month ago (2013-11-11 22:32:19 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaudoin@chromium.org/53283004/550001
7 years, 1 month ago (2013-11-11 22:36:54 UTC) #13
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) content_browsertests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=100414
7 years, 1 month ago (2013-11-12 00:51:47 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaudoin@chromium.org/53283004/550001
7 years, 1 month ago (2013-11-12 01:10:27 UTC) #15
commit-bot: I haz the power
Change committed as 234394
7 years, 1 month ago (2013-11-12 03:50:15 UTC) #16
bulach
7 years, 1 month ago (2013-11-14 13:21:13 UTC) #17
Message was sent while issue was closed.
lgtm for android/

Powered by Google App Engine
This is Rietveld 408576698