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

Issue 2920083002: Prefetching: Introduce store commands abstractions to be used by tasks. (Closed)

Created:
3 years, 6 months ago by carlosk
Modified:
3 years, 6 months ago
CC:
chromium-reviews, romax+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, dewittj
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Prefetching: Introduce store commands abstractions to be used by tasks. Updates AddUniqueUrlsTask (still empty of actual business logic) to use store commands as an abstraction layer for the execution of operations on the persistent prefetching store. Only concrete test version of commands are provided; actual SQL backer implementations will come later. This also adds all the business logic needed for that task to work as the 1st step of the prefetching pipeline but for NWake scheduling. The latter will require a new abstraction to be created and will be left for a follow up patch. BUG=701939 Review-Url: https://codereview.chromium.org/2920083002 Cr-Commit-Position: refs/heads/master@{#480292} Committed: https://chromium.googlesource.com/chromium/src/+/12e48fc0602a0703d598c51577dbe918a3295914

Patch Set 1 #

Patch Set 2 : Rebase on latest depended CL. #

Patch Set 3 : Removed existing store files. #

Patch Set 4 : Rebase and added initial store commands. #

Patch Set 5 : Test fixes and other improvements. #

Patch Set 6 : Fixed build errors. #

Total comments: 10

Patch Set 7 : Rebase. #

Patch Set 8 : Simplified StoreCommand interface; PrefetchURLs+namespace for suggestions. #

Total comments: 1

Patch Set 9 : Typo fix #

Patch Set 10 : Eliminated StoreCommand and simplified its existing specializations. #

Patch Set 11 : Added TODO for NWake #

Total comments: 5

Patch Set 12 : Updated README.md #

Patch Set 13 : Extracted test command factory into its own file which can now be reused. #

Total comments: 2

Patch Set 14 : Merged Tasks and Commands. #

Patch Set 15 : Minor changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -140 lines) Patch
M chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -6 lines 0 comments Download
M components/offline_pages/core/prefetch/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +0 lines, -3 lines 0 comments Download
M components/offline_pages/core/prefetch/README.md View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +25 lines, -3 lines 0 comments Download
M components/offline_pages/core/prefetch/add_unique_urls_task.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -4 lines 0 comments Download
M components/offline_pages/core/prefetch/add_unique_urls_task.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +37 lines, -3 lines 0 comments Download
M components/offline_pages/core/prefetch/prefetch_dispatcher.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -2 lines 0 comments Download
M components/offline_pages/core/prefetch/prefetch_dispatcher_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +19 lines, -16 lines 0 comments Download
D components/offline_pages/core/prefetch/prefetch_in_memory_store.h View 1 2 1 chunk +0 lines, -21 lines 0 comments Download
D components/offline_pages/core/prefetch/prefetch_in_memory_store.cc View 1 2 1 chunk +0 lines, -13 lines 0 comments Download
M components/offline_pages/core/prefetch/prefetch_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -3 lines 0 comments Download
M components/offline_pages/core/prefetch/prefetch_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +0 lines, -3 lines 0 comments Download
M components/offline_pages/core/prefetch/prefetch_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +0 lines, -7 lines 0 comments Download
M components/offline_pages/core/prefetch/prefetch_service_test_taco.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +0 lines, -4 lines 0 comments Download
M components/offline_pages/core/prefetch/prefetch_service_test_taco.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +1 line, -10 lines 0 comments Download
D components/offline_pages/core/prefetch/prefetch_store.h View 1 2 1 chunk +0 lines, -18 lines 0 comments Download
M components/offline_pages/core/prefetch/prefetch_types.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -7 lines 0 comments Download
M components/offline_pages/core/prefetch/suggested_articles_observer.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -8 lines 0 comments Download
M components/offline_pages/core/prefetch/suggested_articles_observer_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -6 lines 0 comments Download
M components/offline_pages/core/prefetch/test_prefetch_dispatcher.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M components/offline_pages/core/prefetch/test_prefetch_dispatcher.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 50 (37 generated)
carlosk
fgorski@: PTAL. dimich@, dewittj@: FYI. (obviously accepting comments from everyone but just wanted to assign ...
3 years, 6 months ago (2017-06-13 00:59:17 UTC) #11
dewittj
Some of this we already discussed but I wanted to codify in my code review ...
3 years, 6 months ago (2017-06-13 18:02:06 UTC) #13
carlosk
Thanks. fgorski@: Could you PTAL at dewittj@'s suggestion of eliminating StoreCommand? https://codereview.chromium.org/2920083002/diff/100001/components/offline_pages/core/prefetch/add_unique_urls_task.h File components/offline_pages/core/prefetch/add_unique_urls_task.h (right): ...
3 years, 6 months ago (2017-06-14 20:32:47 UTC) #22
carlosk
This latest patch set conforms with the latest design discussion with fgorski@. Removing StoreCommand made ...
3 years, 6 months ago (2017-06-15 22:29:08 UTC) #25
dewittj
lgtm, thanks https://codereview.chromium.org/2920083002/diff/200001/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc File chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc (right): https://codereview.chromium.org/2920083002/diff/200001/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc#newcode50 chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc:50: // TODO: Instantiate an actual factory once ...
3 years, 6 months ago (2017-06-15 22:46:50 UTC) #28
carlosk
Thanks. https://codereview.chromium.org/2920083002/diff/200001/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc File chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc (right): https://codereview.chromium.org/2920083002/diff/200001/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc#newcode50 chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc:50: // TODO: Instantiate an actual factory once one ...
3 years, 6 months ago (2017-06-16 01:06:58 UTC) #31
Dmitry Titov
I'm not sure the method of handling zombies implemented here is robust. I know it's ...
3 years, 6 months ago (2017-06-16 01:30:48 UTC) #33
carlosk
On 2017/06/16 01:30:48, Dmitry Titov wrote: > I'm not sure the method of handling zombies ...
3 years, 6 months ago (2017-06-16 16:50:34 UTC) #36
carlosk
I merged Commands into tasks as discussed. PTAL.
3 years, 6 months ago (2017-06-16 21:29:54 UTC) #39
Dmitry Titov
lgtm!
3 years, 6 months ago (2017-06-16 22:47:06 UTC) #40
dewittj
still lgtm
3 years, 6 months ago (2017-06-17 00:06:14 UTC) #43
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/2920083002/280001
3 years, 6 months ago (2017-06-17 05:15:58 UTC) #47
commit-bot: I haz the power
3 years, 6 months ago (2017-06-17 09:55:06 UTC) #50
Message was sent while issue was closed.
Committed patchset #15 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/12e48fc0602a0703d598c51577db...

Powered by Google App Engine
This is Rietveld 408576698