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

Issue 269373002: Store the service worker script and its imports on first load... kinda (Closed)

Created:
6 years, 7 months ago by michaeln
Modified:
6 years, 7 months ago
Reviewers:
kinuko, jsbell, nhiroki
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+watch, alecflett+watch_chromium.org, gavinp
Visibility:
Public.

Description

Store the service worker script and its imports on first load... kinda The resource data is put into an in-memory instance of a net::DiskCache for now. That cache will be used for (some) subsequent starts of the worker in the current browsing session, but will not be used across browser restarts. The next step is to have the registration job store the resource ids with the registration data on disk and to also put the resource data to disk. BUG=364318 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271253

Patch Set 1 #

Total comments: 2

Patch Set 2 : rebase #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 9

Patch Set 5 : #

Total comments: 8

Patch Set 6 : #

Patch Set 7 : rebased #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Total comments: 24

Patch Set 12 : #

Total comments: 2

Patch Set 13 : rebase #

Patch Set 14 : rebase + GetCookieStore() #

Patch Set 15 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+514 lines, -79 lines) Patch
M content/browser/service_worker/service_worker_context_request_handler.cc View 1 2 3 4 5 6 7 8 4 chunks +14 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_database.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_disk_cache.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_read_from_cache_job.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -4 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.cc View 1 2 3 4 5 6 7 2 chunks +12 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_script_cache_map.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +11 lines, -28 lines 0 comments Download
M content/browser/service_worker/service_worker_script_cache_map.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +22 lines, -31 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
A content/browser/service_worker/service_worker_write_to_cache_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +117 lines, -0 lines 0 comments Download
A content/browser/service_worker/service_worker_write_to_cache_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +320 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
michaeln
notes to self https://codereview.chromium.org/269373002/diff/1/content/browser/service_worker/service_worker_context_request_handler.cc File content/browser/service_worker/service_worker_context_request_handler.cc (right): https://codereview.chromium.org/269373002/diff/1/content/browser/service_worker/service_worker_context_request_handler.cc#newcode34 content/browser/service_worker/service_worker_context_request_handler.cc:34: todo: bail out if method != ...
6 years, 7 months ago (2014-05-07 05:46:04 UTC) #1
michaeln
ptal, i think this is ready for a look. resources are cached then later retrieved. ...
6 years, 7 months ago (2014-05-08 01:20:25 UTC) #2
nhiroki
Looks good overall. nits only. https://codereview.chromium.org/269373002/diff/50001/content/browser/service_worker/service_worker_context_request_handler.h File content/browser/service_worker/service_worker_context_request_handler.h (right): https://codereview.chromium.org/269373002/diff/50001/content/browser/service_worker/service_worker_context_request_handler.h#newcode9 content/browser/service_worker/service_worker_context_request_handler.h:9: #include "content/browser/service_worker/service_worker_version.h" nit: Maybe ...
6 years, 7 months ago (2014-05-08 01:58:56 UTC) #3
michaeln
thnx for looking https://codereview.chromium.org/269373002/diff/50001/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/269373002/diff/50001/content/browser/service_worker/service_worker_version.h#newcode89 content/browser/service_worker/service_worker_version.h:89: virtual void OnMainScriptCacheResult(ServiceWorkerVersion* version, On 2014/05/08 ...
6 years, 7 months ago (2014-05-08 02:12:57 UTC) #4
michaeln
> I might back this part out of this cl and do it when i ...
6 years, 7 months ago (2014-05-08 03:35:47 UTC) #5
kinuko
Looks good. Is it still in wip status? Can we have some tests now or ...
6 years, 7 months ago (2014-05-08 08:00:23 UTC) #6
michaeln
> Looks good. Is it still in wip status? Can we > have some tests ...
6 years, 7 months ago (2014-05-08 22:27:23 UTC) #7
michaeln
> I think i should bail on completing the scriptcaching for m36. Having > registration ...
6 years, 7 months ago (2014-05-09 04:41:21 UTC) #8
michaeln
> here's part of the "other integration'y things" > https://codereview.chromium.org/279683002/ and another https://codereview.chromium.org/280423005/
6 years, 7 months ago (2014-05-13 05:45:40 UTC) #9
michaeln
I've been looking more closely at the sequence of events when a new version is ...
6 years, 7 months ago (2014-05-14 23:25:26 UTC) #10
michaeln
I think this is ready for another closer look.
6 years, 7 months ago (2014-05-15 03:18:42 UTC) #11
kinuko
https://codereview.chromium.org/269373002/diff/180001/content/browser/service_worker/service_worker_database.h File content/browser/service_worker/service_worker_database.h (left): https://codereview.chromium.org/269373002/diff/180001/content/browser/service_worker/service_worker_database.h#oldcode60 content/browser/service_worker/service_worker_database.h:60: Why do we remove it? ...oh ok to make ...
6 years, 7 months ago (2014-05-15 16:54:59 UTC) #12
kinuko
(I think the new flow's looking nicer/simpler, btw)
6 years, 7 months ago (2014-05-15 16:56:06 UTC) #13
nhiroki
Looks good overall. Nitpicks only. https://codereview.chromium.org/269373002/diff/180001/content/browser/service_worker/service_worker_context_request_handler.h File content/browser/service_worker/service_worker_context_request_handler.h (right): https://codereview.chromium.org/269373002/diff/180001/content/browser/service_worker/service_worker_context_request_handler.h#newcode9 content/browser/service_worker/service_worker_context_request_handler.h:9: #include "content/browser/service_worker/service_worker_version.h" Can you ...
6 years, 7 months ago (2014-05-15 23:30:08 UTC) #14
michaeln
https://codereview.chromium.org/269373002/diff/180001/content/browser/service_worker/service_worker_context_request_handler.h File content/browser/service_worker/service_worker_context_request_handler.h (right): https://codereview.chromium.org/269373002/diff/180001/content/browser/service_worker/service_worker_context_request_handler.h#newcode9 content/browser/service_worker/service_worker_context_request_handler.h:9: #include "content/browser/service_worker/service_worker_version.h" On 2014/05/15 23:30:08, nhiroki wrote: > Can ...
6 years, 7 months ago (2014-05-15 23:54:30 UTC) #15
michaeln
> (I think the new flow's looking nicer/simpler, btw) thnx
6 years, 7 months ago (2014-05-16 00:06:35 UTC) #16
michaeln
https://codereview.chromium.org/269373002/diff/180001/content/browser/service_worker/service_worker_write_to_cache_job.cc File content/browser/service_worker/service_worker_write_to_cache_job.cc (right): https://codereview.chromium.org/269373002/diff/180001/content/browser/service_worker/service_worker_write_to_cache_job.cc#newcode298 content/browser/service_worker/service_worker_write_to_cache_job.cc:298: void ServiceWorkerWriteToCacheJob::AsyncNotifyDoneHelper( > Why it's called Async? Oh well... ...
6 years, 7 months ago (2014-05-16 00:12:09 UTC) #17
michaeln
I've started working on the next CL that builds on this one, lmk if there's ...
6 years, 7 months ago (2014-05-16 01:44:26 UTC) #18
kinuko
I might be missing some details, but lgtm, let's move this forward https://codereview.chromium.org/269373002/diff/190001/content/browser/service_worker/service_worker_write_to_cache_job.cc File content/browser/service_worker/service_worker_write_to_cache_job.cc ...
6 years, 7 months ago (2014-05-16 03:57:06 UTC) #19
nhiroki
LGTM On 2014/05/16 01:44:26, michaeln wrote: > I've started working on the next CL that ...
6 years, 7 months ago (2014-05-16 05:15:26 UTC) #20
michaeln
https://codereview.chromium.org/269373002/diff/190001/content/browser/service_worker/service_worker_write_to_cache_job.cc File content/browser/service_worker/service_worker_write_to_cache_job.cc (right): https://codereview.chromium.org/269373002/diff/190001/content/browser/service_worker/service_worker_write_to_cache_job.cc#newcode126 content/browser/service_worker/service_worker_write_to_cache_job.cc:126: NULL); // TODO(michaeln): request()->cookie_store() On 2014/05/16 03:57:06, kinuko wrote: ...
6 years, 7 months ago (2014-05-16 21:27:02 UTC) #21
michaeln
The CQ bit was checked by michaeln@chromium.org
6 years, 7 months ago (2014-05-16 23:40:28 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/michaeln@chromium.org/269373002/250001
6 years, 7 months ago (2014-05-16 23:43:11 UTC) #23
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-17 11:47:12 UTC) #24
commit-bot: I haz the power
6 years, 7 months ago (2014-05-17 18:22:16 UTC) #25
Message was sent while issue was closed.
Change committed as 271253

Powered by Google App Engine
This is Rietveld 408576698