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

Issue 2300213002: Adding an IO Data and keyed service to previews/ (Closed)

Created:
4 years, 3 months ago by RyanSturm
Modified:
4 years, 3 months ago
Reviewers:
Lei Zhang, bengr, mmenke
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding an IO Data and keyed service to previews/ Due to the need to have inter-thread communication for black listing and other features of previews/, an IO Data object and KeyedService are introduced. ProfileIOData owns the PreviewsIOData and a new KeyedService, PreviewsService owns a PreviewsUIService object. The major implementation remains in previews/, but the KeyedService is exposed to TabHelpers (chrome/ based WebContentsObservers) and any other UI objects that might need to access previews/. The IOData object is similarly accessible on the IO thread, typically by embedding a raw pointer into objects that need it (e.g., OfflinePageRequestInterceptor, PreviewsNetworkDelegate). The inter-thread communication model will be consumed by the previews/ opt-out black list, which will need to access the black list on the IO thread for synchronous calls and access previews/ on the UI thread with asynchronous calls. BUG=639087 Committed: https://crrev.com/41832e5474cea7ddeafefac5872134408fdfefdc Cr-Commit-Position: refs/heads/master@{#417668}

Patch Set 1 #

Patch Set 2 : comment fix #

Patch Set 3 : paren #

Patch Set 4 : unittests #

Patch Set 5 : change to unittest #

Total comments: 12

Patch Set 6 : bengr comments #

Patch Set 7 : adding an owners file #

Total comments: 17

Patch Set 8 : thestig comments #

Total comments: 6

Patch Set 9 : thestig comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+521 lines, -1 line) Patch
M chrome/browser/BUILD.gn View 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/previews/OWNERS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A chrome/browser/previews/previews_service.h View 1 2 3 4 5 6 7 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/browser/previews/previews_service.cc View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/previews/previews_service_factory.h View 1 2 3 4 5 6 7 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/previews/previews_service_factory.cc View 1 2 3 4 5 6 7 8 1 chunk +41 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -0 lines 1 comment Download
M chrome/browser/profiles/profile_io_data.h View 4 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M components/previews/BUILD.gn View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M components/previews/OWNERS View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A components/previews/previews_io_data.h View 1 2 3 4 5 6 7 8 1 chunk +56 lines, -0 lines 0 comments Download
A components/previews/previews_io_data.cc View 1 2 3 4 5 6 7 1 chunk +40 lines, -0 lines 0 comments Download
A components/previews/previews_io_data_unittest.cc View 1 2 3 4 5 6 7 1 chunk +80 lines, -0 lines 0 comments Download
A components/previews/previews_ui_service.h View 1 2 3 4 5 6 7 1 chunk +48 lines, -0 lines 0 comments Download
A components/previews/previews_ui_service.cc View 1 chunk +27 lines, -0 lines 0 comments Download
A components/previews/previews_ui_service_unittest.cc View 1 2 3 4 5 6 7 1 chunk +83 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (36 generated)
RyanSturm
bengr: PTAL @ *
4 years, 3 months ago (2016-09-02 18:33:55 UTC) #16
bengr
lgtm with requests for comments and nits. https://codereview.chromium.org/2300213002/diff/80001/chrome/browser/previews/previews_service.cc File chrome/browser/previews/previews_service.cc (right): https://codereview.chromium.org/2300213002/diff/80001/chrome/browser/previews/previews_service.cc#newcode18 chrome/browser/previews/previews_service.cc:18: void PreviewsService::set_previews_ui_service( ...
4 years, 3 months ago (2016-09-08 00:19:10 UTC) #21
RyanSturm
mmenke: PTAL @ profile*_io_data.* thestig: PTAL @ chrome/browser/previews/* (and BUILD.GN) https://codereview.chromium.org/2300213002/diff/80001/chrome/browser/previews/previews_service.cc File chrome/browser/previews/previews_service.cc (right): https://codereview.chromium.org/2300213002/diff/80001/chrome/browser/previews/previews_service.cc#newcode18 ...
4 years, 3 months ago (2016-09-08 18:34:33 UTC) #25
mmenke
"previews/" is lo-fi mode?
4 years, 3 months ago (2016-09-08 18:44:54 UTC) #26
RyanSturm
On 2016/09/08 18:44:54, mmenke wrote: > "previews/" is lo-fi mode? They are a class of ...
4 years, 3 months ago (2016-09-08 18:47:04 UTC) #27
Lei Zhang
Do you think previews will be confused with print preview? Can you add OWNERS for ...
4 years, 3 months ago (2016-09-08 18:49:37 UTC) #28
RyanSturm
On 2016/09/08 18:49:37, Lei Zhang wrote: > Do you think previews will be confused with ...
4 years, 3 months ago (2016-09-08 18:53:05 UTC) #30
Lei Zhang
On 2016/09/08 18:53:05, Ryan Sturm wrote: > On 2016/09/08 18:49:37, Lei Zhang wrote: > > ...
4 years, 3 months ago (2016-09-08 18:54:03 UTC) #32
RyanSturm
On 2016/09/08 18:54:03, Lei Zhang wrote: > On 2016/09/08 18:53:05, Ryan Sturm wrote: > > ...
4 years, 3 months ago (2016-09-08 18:56:41 UTC) #33
Lei Zhang
On 2016/09/08 18:56:41, Ryan Sturm wrote: > components/previews/OWNERS already exists. Ah, indeed. Try to add ...
4 years, 3 months ago (2016-09-08 18:59:20 UTC) #34
Lei Zhang
https://codereview.chromium.org/2300213002/diff/120001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/2300213002/diff/120001/chrome/browser/BUILD.gn#newcode856 chrome/browser/BUILD.gn:856: "previews/previews_service.cc", Just to confirm, this feature is for all ...
4 years, 3 months ago (2016-09-08 19:06:23 UTC) #35
RyanSturm
thestig: PTAL, thanks https://codereview.chromium.org/2300213002/diff/120001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/2300213002/diff/120001/chrome/browser/BUILD.gn#newcode856 chrome/browser/BUILD.gn:856: "previews/previews_service.cc", On 2016/09/08 19:06:23, Lei Zhang ...
4 years, 3 months ago (2016-09-08 20:19:10 UTC) #38
Lei Zhang
https://codereview.chromium.org/2300213002/diff/120001/chrome/browser/previews/previews_service_factory.h File chrome/browser/previews/previews_service_factory.h (right): https://codereview.chromium.org/2300213002/diff/120001/chrome/browser/previews/previews_service_factory.h#newcode8 chrome/browser/previews/previews_service_factory.h:8: #include "base/memory/singleton.h" On 2016/09/08 20:19:09, Ryan Sturm wrote: > ...
4 years, 3 months ago (2016-09-08 21:31:58 UTC) #41
RyanSturm
thestig: PTAL, thanks https://codereview.chromium.org/2300213002/diff/140001/chrome/browser/previews/previews_service_factory.cc File chrome/browser/previews/previews_service_factory.cc (right): https://codereview.chromium.org/2300213002/diff/140001/chrome/browser/previews/previews_service_factory.cc#newcode14 chrome/browser/previews/previews_service_factory.cc:14: static base::LazyInstance<PreviewsServiceFactory> g_previews_factory = On 2016/09/08 ...
4 years, 3 months ago (2016-09-08 22:18:26 UTC) #43
Lei Zhang
lgtm
4 years, 3 months ago (2016-09-08 22:20:52 UTC) #45
mmenke
profiles/ LGTM https://codereview.chromium.org/2300213002/diff/160001/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (right): https://codereview.chromium.org/2300213002/diff/160001/chrome/browser/profiles/profile_impl_io_data.cc#newcode215 chrome/browser/profiles/profile_impl_io_data.cc:215: BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); If this is currently an Android-only ...
4 years, 3 months ago (2016-09-08 22:40:27 UTC) #46
bengr
On 2016/09/08 22:40:27, mmenke wrote: > profiles/ LGTM > > https://codereview.chromium.org/2300213002/diff/160001/chrome/browser/profiles/profile_impl_io_data.cc > File chrome/browser/profiles/profile_impl_io_data.cc (right): ...
4 years, 3 months ago (2016-09-09 19:13:56 UTC) #49
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/2300213002/160001
4 years, 3 months ago (2016-09-09 19:27:30 UTC) #52
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 3 months ago (2016-09-09 19:34:28 UTC) #54
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 19:37:37 UTC) #56
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/41832e5474cea7ddeafefac5872134408fdfefdc
Cr-Commit-Position: refs/heads/master@{#417668}

Powered by Google App Engine
This is Rietveld 408576698