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

Issue 870063002: Componentize TopSites, TopSitesBackend, TopSitesDatabase (Closed)

Created:
5 years, 11 months ago by sdefresne
Modified:
5 years, 10 months ago
CC:
aandrey+blink_chromium.org, browser-components-watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, dbeam+watch-ntp_chromium.org, David Black, devtools-reviews_chromium.org, dhollowa+watch_chromium.org, donnd+watch_chromium.org, dougw+watch_chromium.org, estade+watch_chromium.org, extensions-reviews_chromium.org, Jered, jfweitz+watch_chromium.org, kmadhusu+watch_chromium.org, melevin+watch_chromium.org, paulirish+reviews_chromium.org, pedrosimonetti+watch_chromium.org, pfeldman, samarth+watch_chromium.org, skanuj+watch_chromium.org, James Su, tfarina, vsevik, yurys
Base URL:
https://chromium.googlesource.com/chromium/src.git@815983002
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Componentize TopSites, TopSitesBackend, TopSitesDatabase TopSites prepopulated pages are not injected by the embedder via the TopSitesFactory. The method TopSites::GetPrepopulatedSites() now does return the sites favicon, thumbnail and color in addition to the URL and title. TopSitesImplTest now can inject prepopulated pages to the TopSitesImpl thus enabling the test TopSitesImplTest.BlacklistingWithPrepopulated on Android. Change TopSites so that it does not inherit from content::NotificationObserver as it does not need to listen to notification and move the inheritance to TopSitesImpl (until the code is changed to use observer pattern instead of notifications). Remove dependency of TopSitesBackend on content::BrowserThread by injecting a base::SingleThreadedTaskRunner reference to the corresponding thread via the TopSitesImpl::Init() method. Introduce //components/test/data/history and move pristine SQL files used by the different unit tests there, helping remove dependency of the unit tests on //chrome. Move top_sites.{cc,h}, top_sites_database.{cc,h} into //components/history/core/browser. BUG=380144, 380157 TBR=sky, dgozman, samarth Committed: https://crrev.com/0da3bc0e26f768834feca7a5e1c0c70f4c88e453 Cr-Commit-Position: refs/heads/master@{#313740}

Patch Set 1 #

Total comments: 15

Patch Set 2 : Address comments #

Patch Set 3 : Rebase #

Patch Set 4 : Add #include lost in rebase #

Patch Set 5 : Rebase #

Patch Set 6 : Fix compilation on win and android #

Patch Set 7 : Fix android_clang_dbg_recipe compilation #

Patch Set 8 : Rebase #

Patch Set 9 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+627 lines, -2952 lines) Patch
M chrome/browser/android/dev_tools_manager_delegate_android.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/dev_tools_server.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/most_visited_sites.cc View 1 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/android/provider/chrome_browser_provider.cc View 1 2 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/autocomplete/zero_suggest_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autocomplete/zero_suggest_provider_unittest.cc View 1 3 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/devtools/browser_list_tabcontents_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/devtools/chrome_devtools_manager_delegate.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/top_sites/top_sites_api.cc View 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 5 chunks +14 lines, -4 lines 0 comments Download
M chrome/browser/history/expire_history_backend_unittest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/history/history_unittest.cc View 1 2 2 chunks +1 line, -1 line 0 comments Download
D chrome/browser/history/top_sites.h View 1 2 1 chunk +0 lines, -194 lines 0 comments Download
D chrome/browser/history/top_sites.cc View 1 2 1 chunk +0 lines, -53 lines 0 comments Download
D chrome/browser/history/top_sites_backend.h View 1 chunk +0 lines, -97 lines 0 comments Download
D chrome/browser/history/top_sites_backend.cc View 1 chunk +0 lines, -140 lines 0 comments Download
D chrome/browser/history/top_sites_database.h View 1 chunk +0 lines, -110 lines 0 comments Download
D chrome/browser/history/top_sites_database.cc View 1 chunk +0 lines, -736 lines 0 comments Download
D chrome/browser/history/top_sites_database_unittest.cc View 1 chunk +0 lines, -479 lines 0 comments Download
M chrome/browser/history/top_sites_factory.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/history/top_sites_factory.cc View 1 2 3 4 5 6 7 8 2 chunks +64 lines, -3 lines 0 comments Download
M chrome/browser/history/top_sites_impl.h View 1 2 3 5 chunks +14 lines, -7 lines 0 comments Download
M chrome/browser/history/top_sites_impl.cc View 1 2 7 chunks +19 lines, -29 lines 0 comments Download
M chrome/browser/history/top_sites_impl_unittest.cc View 1 2 39 chunks +74 lines, -53 lines 0 comments Download
M chrome/browser/jumplist_win.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/precache/most_visited_urls_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search/instant_service.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/thumbnails/thumbnail_list_source.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/thumbnails/thumbnail_service_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/thumbnails/thumbnail_service_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/ui/search/instant_extended_interactive_uitest.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/ui/tabs/tab_strip_model_utils.cc View 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 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/favicon_source.cc View 1 2 3 chunks +15 lines, -12 lines 0 comments Download
M chrome/browser/ui/webui/ntp/favicon_webui_handler.cc View 1 2 chunks +15 lines, -11 lines 0 comments Download
M chrome/browser/ui/webui/ntp/most_visited_handler.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/suggestions_page_handler.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 4 3 chunks +6 lines, -4 lines 0 comments Download
D chrome/test/data/History/TopSites.v1.sql View 1 chunk +0 lines, -13 lines 0 comments Download
D chrome/test/data/History/TopSites.v2.sql View 1 chunk +0 lines, -13 lines 0 comments Download
D chrome/test/data/History/TopSites.v3.sql View 1 chunk +0 lines, -13 lines 0 comments Download
D chrome/tools/profiles/thumbnail-inl.h View 1 chunk +0 lines, -813 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M components/history.gypi View 1 3 chunks +9 lines, -0 lines 0 comments Download
M components/history/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M components/history/core/browser/BUILD.gn View 1 2 chunks +7 lines, -0 lines 0 comments Download
A + components/history/core/browser/top_sites.h View 1 2 8 chunks +31 lines, -37 lines 0 comments Download
A + components/history/core/browser/top_sites.cc View 1 2 1 chunk +16 lines, -20 lines 0 comments Download
A + components/history/core/browser/top_sites_backend.h View 1 5 chunks +8 lines, -5 lines 0 comments Download
A + components/history/core/browser/top_sites_backend.cc View 1 4 chunks +27 lines, -35 lines 0 comments Download
A + components/history/core/browser/top_sites_database.h View 1 3 chunks +4 lines, -5 lines 0 comments Download
A + components/history/core/browser/top_sites_database.cc View 1 8 chunks +12 lines, -16 lines 0 comments Download
A + components/history/core/browser/top_sites_database_unittest.cc View 2 chunks +3 lines, -15 lines 0 comments Download
M components/history/core/test/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A components/history/core/test/database_test_utils.h View 1 chunk +23 lines, -0 lines 0 comments Download
A components/history/core/test/database_test_utils.cc View 1 chunk +35 lines, -0 lines 0 comments Download
A components/history/core/test/thumbnail-inl.h View 1 chunk +194 lines, -0 lines 0 comments Download
A + components/test/data/history/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A + components/test/data/history/TopSites.v1.sql View 0 chunks +-1 lines, --1 lines 0 comments Download
A + components/test/data/history/TopSites.v2.sql View 0 chunks +-1 lines, --1 lines 0 comments Download
A + components/test/data/history/TopSites.v3.sql View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 25 (7 generated)
sdefresne
Please take a look.
5 years, 11 months ago (2015-01-26 23:00:57 UTC) #2
droger
only nits https://codereview.chromium.org/870063002/diff/1/chrome/browser/history/top_sites_factory.cc File chrome/browser/history/top_sites_factory.cc (right): https://codereview.chromium.org/870063002/diff/1/chrome/browser/history/top_sites_factory.cc#newcode85 chrome/browser/history/top_sites_factory.cc:85: for (size_t i = 0; i < ...
5 years, 11 months ago (2015-01-27 10:08:37 UTC) #3
sdefresne
PTAL https://codereview.chromium.org/870063002/diff/1/chrome/browser/history/top_sites_factory.cc File chrome/browser/history/top_sites_factory.cc (right): https://codereview.chromium.org/870063002/diff/1/chrome/browser/history/top_sites_factory.cc#newcode85 chrome/browser/history/top_sites_factory.cc:85: for (size_t i = 0; i < arraysize(kRawPrepopulatedPages); ...
5 years, 11 months ago (2015-01-27 13:55:16 UTC) #4
droger
lgtm
5 years, 11 months ago (2015-01-27 15:43:18 UTC) #5
sdefresne
bauerb: please review as OWNERS of - chrome/browser/android/ - chrome/browser/ui/webui/ pkasting: please review as OWNERS ...
5 years, 11 months ago (2015-01-27 18:13:08 UTC) #7
sdefresne
+ samarth for OWNERS of chrome/browser/search and chrome/browser/ui/search
5 years, 11 months ago (2015-01-27 18:14:02 UTC) #9
Bernhard Bauer
Android and Web UI LGTM. BTW, TBR'ing the mechanical part of this change (renaming includes) ...
5 years, 11 months ago (2015-01-27 18:33:50 UTC) #10
bengr
On 2015/01/27 18:33:50, Bernhard Bauer wrote: > Android and Web UI LGTM. > > BTW, ...
5 years, 11 months ago (2015-01-27 19:03:04 UTC) #11
Peter Kasting
On 2015/01/27 18:13:08, sdefresne wrote: > pkasting: please review as OWNERS of > - chrome/browser/autocomplete ...
5 years, 11 months ago (2015-01-27 19:18:19 UTC) #12
sdefresne
bsalomon@: need OWNERS approval for adding a new dependency on third_party/skia from components/history
5 years, 10 months ago (2015-01-28 09:45:40 UTC) #14
Finnur
> chrome/browser/extensions/api/top_sites/ LGTM
5 years, 10 months ago (2015-01-28 11:46:12 UTC) #15
Paweł Hajdan Jr.
chrome/test/base LGTM
5 years, 10 months ago (2015-01-28 13:13:23 UTC) #16
bsalomon
On 2015/01/28 09:45:40, sdefresne wrote: > bsalomon@: need OWNERS approval for adding a new dependency ...
5 years, 10 months ago (2015-01-28 14:54:44 UTC) #17
bsalomon
On 2015/01/28 09:45:40, sdefresne wrote: > bsalomon@: need OWNERS approval for adding a new dependency ...
5 years, 10 months ago (2015-01-28 14:54:46 UTC) #18
sdefresne
TBR-ing OWNERS of the remaining files impacted by mechanical changes (file move).
5 years, 10 months ago (2015-01-29 16:41:56 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/870063002/160001
5 years, 10 months ago (2015-01-29 17:22:05 UTC) #23
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 10 months ago (2015-01-29 18:27:08 UTC) #24
commit-bot: I haz the power
5 years, 10 months ago (2015-01-29 18:28:13 UTC) #25
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/0da3bc0e26f768834feca7a5e1c0c70f4c88e453
Cr-Commit-Position: refs/heads/master@{#313740}

Powered by Google App Engine
This is Rietveld 408576698