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

Issue 1113303003: CacheStorage: Support multiple batch operations (Closed)

Created:
5 years, 7 months ago by nhiroki
Modified:
5 years, 7 months ago
Reviewers:
jkarlin
CC:
chromium-reviews, darin-cc_chromium.org, jam, jkarlin+watch_chromium.org, nhiroki, serviceworker-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@remove_responses
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CacheStorage: Support multiple batch operations This is groundwork for supporting cache.addAll() [1]. The current backend implementation assumes that a cache IPC message contains just one batch operation, so the backend cannot handle multiple batch operations issued by cache.addAll(). To support them, this CL introduces CacheStorageCache::BatchOperation which is an entry point for put/delete operations and roughly corresponds to the BatchCacheOperations algorithm in the spec [2]. According to the spec, batch operations should atomically be done, but this CL does not support it yet. [1] https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache-addAll [2] https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#batch-cache-operations-algorithm BUG=426928, 427652 TEST=content_unittests --gtest_filter=CacheStorage* TEST=run-webkit-tests http/tests/cachestorage/ Committed: https://crrev.com/d04e05cd1fafc6c666ff07a30f94bca781fe5d60 Cr-Commit-Position: refs/heads/master@{#329121}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : address review comments and add tests #

Total comments: 13

Patch Set 3 : rebase #

Patch Set 4 : add comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -128 lines) Patch
M content/browser/cache_storage/cache_storage_cache.h View 1 2 3 3 chunks +27 lines, -13 lines 0 comments Download
M content/browser/cache_storage/cache_storage_cache.cc View 1 2 3 6 chunks +117 lines, -42 lines 0 comments Download
M content/browser/cache_storage/cache_storage_cache_unittest.cc View 1 2 3 7 chunks +106 lines, -34 lines 0 comments Download
M content/browser/cache_storage/cache_storage_dispatcher_host.cc View 1 2 1 chunk +2 lines, -32 lines 0 comments Download
M content/browser/cache_storage/cache_storage_manager_unittest.cc View 1 2 1 chunk +12 lines, -7 lines 0 comments Download

Messages

Total messages: 25 (14 generated)
nhiroki
Hi jkarlin@, can you review this? If this is on the right track, I'll add ...
5 years, 7 months ago (2015-05-07 08:13:09 UTC) #12
jkarlin
Nice. Looking forward to the unittests. https://codereview.chromium.org/1113303003/diff/200001/content/browser/cache_storage/cache_storage_cache.cc File content/browser/cache_storage/cache_storage_cache.cc (right): https://codereview.chromium.org/1113303003/diff/200001/content/browser/cache_storage/cache_storage_cache.cc#newcode167 content/browser/cache_storage/cache_storage_cache.cc:167: class BatchOperationManager : ...
5 years, 7 months ago (2015-05-07 13:06:16 UTC) #13
nhiroki
Thank you for reviewing! Added tests. Can you take another look? https://codereview.chromium.org/1113303003/diff/200001/content/browser/cache_storage/cache_storage_cache.cc File content/browser/cache_storage/cache_storage_cache.cc (right): ...
5 years, 7 months ago (2015-05-08 04:00:58 UTC) #15
jkarlin
Almost there, just a nit and a couple more tests requested. https://codereview.chromium.org/1113303003/diff/240001/content/browser/cache_storage/cache_storage_cache.h File content/browser/cache_storage/cache_storage_cache.h (right): ...
5 years, 7 months ago (2015-05-08 11:45:43 UTC) #16
jkarlin
https://codereview.chromium.org/1113303003/diff/240001/content/browser/cache_storage/cache_storage_cache.h File content/browser/cache_storage/cache_storage_cache.h (right): https://codereview.chromium.org/1113303003/diff/240001/content/browser/cache_storage/cache_storage_cache.h#newcode78 content/browser/cache_storage/cache_storage_cache.h:78: // algorithm in the spec. Add a TODO and ...
5 years, 7 months ago (2015-05-08 12:04:26 UTC) #17
nhiroki
Thank you for reviewing! This contains only comment replies. I'll update the patch later. https://codereview.chromium.org/1113303003/diff/240001/content/browser/cache_storage/cache_storage_cache_unittest.cc ...
5 years, 7 months ago (2015-05-08 15:09:02 UTC) #18
jkarlin
lgtm with nits https://codereview.chromium.org/1113303003/diff/240001/content/browser/cache_storage/cache_storage_cache.h File content/browser/cache_storage/cache_storage_cache.h (right): https://codereview.chromium.org/1113303003/diff/240001/content/browser/cache_storage/cache_storage_cache.h#newcode78 content/browser/cache_storage/cache_storage_cache.h:78: // algorithm in the spec. Add ...
5 years, 7 months ago (2015-05-08 15:27:27 UTC) #19
nhiroki
Thank you! Updated. https://codereview.chromium.org/1113303003/diff/240001/content/browser/cache_storage/cache_storage_cache.h File content/browser/cache_storage/cache_storage_cache.h (right): https://codereview.chromium.org/1113303003/diff/240001/content/browser/cache_storage/cache_storage_cache.h#newcode78 content/browser/cache_storage/cache_storage_cache.h:78: // algorithm in the spec. On ...
5 years, 7 months ago (2015-05-11 07:35:04 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1113303003/280001
5 years, 7 months ago (2015-05-11 07:40:28 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:280001)
5 years, 7 months ago (2015-05-11 08:42:23 UTC) #24
commit-bot: I haz the power
5 years, 7 months ago (2015-05-11 08:43:20 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/d04e05cd1fafc6c666ff07a30f94bca781fe5d60
Cr-Commit-Position: refs/heads/master@{#329121}

Powered by Google App Engine
This is Rietveld 408576698