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

Issue 465463002: Initial implementation of ServiceWorkerCache. (Closed)

Created:
6 years, 4 months ago by jkarlin
Modified:
6 years, 3 months ago
Reviewers:
michaeln, gavinp
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, cbentzel+watch_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, alecflett+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@cache2
Project:
chromium
Visibility:
Public.

Description

Initial implementation of ServiceWorkerCache Put and Match functions. Note that the Match() function copies the data into a memory blob. This is of course only for demo purposes. This will soon be changed to use a streaming API. See bug 403493. BUG=392621 Committed: https://crrev.com/b5ca81a3262238668cc4e59a90f51d7e8f6360d4 Cr-Commit-Position: refs/heads/master@{#291834}

Patch Set 1 #

Patch Set 2 : Add the test file #

Patch Set 3 : Put seems to work in test #

Patch Set 4 : Now with lightly tested Match function! It doesn't support bodies yet though. #

Patch Set 5 : Rebase #

Patch Set 6 : Sane types #

Patch Set 7 : Put and Match mostly work with blobs but the first few bytes are screwy #

Total comments: 24

Patch Set 8 : Put and Match work and pass tests #

Patch Set 9 : Rebase #

Patch Set 10 : Adds Delete and addresses comments from PS7 #

Patch Set 11 : Nits #

Total comments: 16

Patch Set 12 : Address gavinp's comments from PS11 #

Patch Set 13 : Address michaeln's comments from PS11 #

Patch Set 14 : Rebase #

Patch Set 15 : Remove unnecessary include #

Patch Set 16 : Switch to BlockFile backend while SimpleCache gets fixed #

Patch Set 17 : Rebase #

Patch Set 18 : Only create the cache once #

Patch Set 19 : Rebase #

Patch Set 20 : Only create the cache once (properly) #

Patch Set 21 : Fix order of eval error #

Total comments: 22

Patch Set 22 : Rebase #

Patch Set 23 : Addresses comments from 21 #

Patch Set 24 : Comments on inputs (request and response) and back to SimpleCache now that it's fixed #

Total comments: 8

Patch Set 25 : Rebase (webkit_blob -> storage) #

Patch Set 26 : Address comments from PS 24 #

Patch Set 27 : Default backend #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1069 lines, -24 lines) Patch
M content/browser/service_worker/service_worker_cache.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +49 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 3 chunks +670 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_cache.proto View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +14 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_cache_storage.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_storage.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +13 lines, -8 lines 0 comments Download
A content/browser/service_worker/service_worker_cache_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +312 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -0 lines 0 comments Download
M net/base/io_buffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M net/base/io_buffer.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
jkarlin
Note that this is not yet cleaned up and for some reason the first few ...
6 years, 4 months ago (2014-08-13 20:16:23 UTC) #1
michaeln
some early comments https://codereview.chromium.org/465463002/diff/140001/content/browser/service_worker/service_worker_cache.cc File content/browser/service_worker/service_worker_cache.cc (right): https://codereview.chromium.org/465463002/diff/140001/content/browser/service_worker/service_worker_cache.cc#newcode27 content/browser/service_worker/service_worker_cache.cc:27: const int kMaxCacheBytes = 5 * ...
6 years, 4 months ago (2014-08-14 10:35:20 UTC) #2
jkarlin
Okay, PTAL! https://codereview.chromium.org/465463002/diff/140001/content/browser/service_worker/service_worker_cache.cc File content/browser/service_worker/service_worker_cache.cc (right): https://codereview.chromium.org/465463002/diff/140001/content/browser/service_worker/service_worker_cache.cc#newcode27 content/browser/service_worker/service_worker_cache.cc:27: const int kMaxCacheBytes = 5 * 1024 ...
6 years, 4 months ago (2014-08-14 19:53:33 UTC) #3
gavinp
https://codereview.chromium.org/465463002/diff/220001/net/base/io_buffer.h File net/base/io_buffer.h (right): https://codereview.chromium.org/465463002/diff/220001/net/base/io_buffer.h#newcode129 net/base/io_buffer.h:129: class NET_EXPORT ZeroCopyStringIOBuffer : public IOBuffer { Firstly, this ...
6 years, 4 months ago (2014-08-14 22:02:45 UTC) #4
michaeln1
https://codereview.chromium.org/465463002/diff/140001/content/browser/service_worker/service_worker_cache.cc File content/browser/service_worker/service_worker_cache.cc (right): https://codereview.chromium.org/465463002/diff/140001/content/browser/service_worker/service_worker_cache.cc#newcode195 content/browser/service_worker/service_worker_cache.cc:195: &backend_, > The ServiceWorkerCacheStorage::Delete(cache) can't be called until create ...
6 years, 4 months ago (2014-08-14 22:57:09 UTC) #5
michaeln
i think this lgtm for our immediate goals (modulo the potential &backend_ memory access at ...
6 years, 4 months ago (2014-08-14 22:59:01 UTC) #6
jkarlin
https://codereview.chromium.org/465463002/diff/220001/net/base/io_buffer.h File net/base/io_buffer.h (right): https://codereview.chromium.org/465463002/diff/220001/net/base/io_buffer.h#newcode129 net/base/io_buffer.h:129: class NET_EXPORT ZeroCopyStringIOBuffer : public IOBuffer { On 2014/08/14 ...
6 years, 4 months ago (2014-08-15 00:13:34 UTC) #7
gavinp
net/ lgtm
6 years, 4 months ago (2014-08-15 01:27:48 UTC) #8
jkarlin
https://codereview.chromium.org/465463002/diff/140001/content/browser/service_worker/service_worker_cache.cc File content/browser/service_worker/service_worker_cache.cc (right): https://codereview.chromium.org/465463002/diff/140001/content/browser/service_worker/service_worker_cache.cc#newcode195 content/browser/service_worker/service_worker_cache.cc:195: &backend_, On 2014/08/14 22:57:09, michaeln1 wrote: > > The ...
6 years, 4 months ago (2014-08-15 11:49:44 UTC) #9
jkarlin
The CQ bit was checked by jkarlin@chromium.org
6 years, 4 months ago (2014-08-15 13:11:41 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jkarlin@chromium.org/465463002/310001
6 years, 4 months ago (2014-08-15 13:12:32 UTC) #11
jkarlin
The CQ bit was checked by jkarlin@chromium.org
6 years, 4 months ago (2014-08-15 18:19:17 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jkarlin@chromium.org/465463002/350001
6 years, 4 months ago (2014-08-15 18:23:05 UTC) #13
jkarlin
The CQ bit was unchecked by jkarlin@chromium.org
6 years, 4 months ago (2014-08-15 18:53:57 UTC) #14
jkarlin
michaeln: PTAL at the changes since PS17 before I commit. Thanks!
6 years, 4 months ago (2014-08-20 19:20:02 UTC) #15
jkarlin
On 2014/08/20 19:20:02, jkarlin wrote: > michaeln: PTAL at the changes since PS17 before I ...
6 years, 4 months ago (2014-08-20 19:20:43 UTC) #16
michaeln1
> > michaeln: PTAL at the changes since PS17 before I commit. Thanks! > Sorry, ...
6 years, 4 months ago (2014-08-20 20:56:47 UTC) #17
michaeln
i'd like to understand more about the interface between the renderer and browser you're working ...
6 years, 4 months ago (2014-08-21 01:46:15 UTC) #18
jkarlin
Thanks Michael! https://codereview.chromium.org/465463002/diff/530001/content/browser/service_worker/service_worker_cache.cc File content/browser/service_worker/service_worker_cache.cc (right): https://codereview.chromium.org/465463002/diff/530001/content/browser/service_worker/service_worker_cache.cc#newcode27 content/browser/service_worker/service_worker_cache.cc:27: const int kMaxCacheBytes = 512 * 1024 ...
6 years, 4 months ago (2014-08-21 18:31:21 UTC) #19
jkarlin
michaeln: PTAL. Thanks so much.
6 years, 4 months ago (2014-08-22 16:22:14 UTC) #20
jkarlin
On 2014/08/22 16:22:14, jkarlin wrote: > michaeln: PTAL. Thanks so much. Ping :)
6 years, 4 months ago (2014-08-22 23:49:13 UTC) #21
jkarlin
On 2014/08/22 23:49:13, jkarlin wrote: > On 2014/08/22 16:22:14, jkarlin wrote: > > michaeln: PTAL. ...
6 years, 4 months ago (2014-08-25 19:09:52 UTC) #22
michaeln
lgtm https://codereview.chromium.org/465463002/diff/630001/content/browser/service_worker/service_worker_cache.h File content/browser/service_worker/service_worker_cache.h (right): https://codereview.chromium.org/465463002/diff/630001/content/browser/service_worker/service_worker_cache.h#newcode80 content/browser/service_worker/service_worker_cache.h:80: // ErrorTypeOK. The callback will always be called. ...
6 years, 4 months ago (2014-08-25 21:16:49 UTC) #23
jkarlin
https://codereview.chromium.org/465463002/diff/630001/content/browser/service_worker/service_worker_cache.h File content/browser/service_worker/service_worker_cache.h (right): https://codereview.chromium.org/465463002/diff/630001/content/browser/service_worker/service_worker_cache.h#newcode80 content/browser/service_worker/service_worker_cache.h:80: // ErrorTypeOK. The callback will always be called. |request| ...
6 years, 4 months ago (2014-08-25 23:51:46 UTC) #24
jkarlin
The CQ bit was checked by jkarlin@chromium.org
6 years, 4 months ago (2014-08-25 23:51:54 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jkarlin@chromium.org/465463002/670001
6 years, 4 months ago (2014-08-25 23:53:09 UTC) #26
jkarlin
The CQ bit was unchecked by jkarlin@chromium.org
6 years, 4 months ago (2014-08-26 00:45:10 UTC) #27
jkarlin
The CQ bit was checked by jkarlin@chromium.org
6 years, 4 months ago (2014-08-26 01:52:41 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jkarlin@chromium.org/465463002/690001
6 years, 4 months ago (2014-08-26 01:53:47 UTC) #29
commit-bot: I haz the power
Committed patchset #27 (690001) as 297ad0dc13be3e4b0c3f51c2e1eb2cf6ae161e1b
6 years, 4 months ago (2014-08-26 03:59:44 UTC) #30
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:40:16 UTC) #31
Message was sent while issue was closed.
Patchset 27 (id:??) landed as
https://crrev.com/b5ca81a3262238668cc4e59a90f51d7e8f6360d4
Cr-Commit-Position: refs/heads/master@{#291834}

Powered by Google App Engine
This is Rietveld 408576698