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

Issue 931173002: Implement EmbeddedWorkerContextClient.setCachedMetadata/clearCachedMetadata (Closed)

Created:
5 years, 10 months ago by horo
Modified:
5 years, 10 months ago
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, mlamouri+watch-content_chromium.org, tzik, serviceworker-reviews, jam, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, kinuko+serviceworker, kinuko+watch
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement EmbeddedWorkerContextClient.setCachedMetadata/clearCachedMetadata This cl depends on Chromium: - Introduce AppCacheResponseMetadataWriter to support metadata caching. https://codereview.chromium.org/932643002/ Blink: - CachedMetadata support for ServiceWorker script. https://codereview.chromium.org/929953002/ After https://codereview.chromium.org/929953002/, EmbeddedWorkerContextClient.setCachedMetadata/clearCachedMetadata will be called when V8ScriptRunner calls CachedMetadataHandler.setCachedMetadata/clearCachedMetadata in a ServiceWorker. This cl implements these methods. When these methods are called, ServiceWorkerScriptContext sends IPC to the broeser process. ServiceWorkerVersion recieves these messages and calls ServiceWorkerScriptCacheMap.WriteMetadata/ClearMetadata. ServiceWorkerScriptCacheMap creates ServiceWorkerResponseMetadataWriter to write/clear the metadata in ServiceWorkerStorage. ServiceWorkerResponseMetadataWriter is a subclass of AppCacheResponseMetadataWriter which is introduced https://codereview.chromium.org/932643002/. TEST=content_unittests.exe --gtest_filter=ServiceWorkerResourceStorageTest.* BUG=449895 Committed: https://crrev.com/c514247c033d77fff1481a94fc923c907baa3fe5 Cr-Commit-Position: refs/heads/master@{#317441}

Patch Set 1 #

Total comments: 8

Patch Set 2 : incorporated michaeln's comment #

Patch Set 3 : change comments in service_worker_messages.h #

Patch Set 4 : check process_id in EmbeddedWorkerRegistry::OnMessageReceived() #

Patch Set 5 : fix tests #

Patch Set 6 : fix clang failure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+282 lines, -8 lines) Patch
M content/browser/service_worker/embedded_worker_registry.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/embedded_worker_registry.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_disk_cache.h View 1 chunk +9 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_disk_cache.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_script_cache_map.h View 1 4 chunks +15 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_script_cache_map.cc View 2 chunks +40 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.h View 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 1 2 3 4 5 2 chunks +109 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 4 chunks +36 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M content/renderer/service_worker/embedded_worker_context_client.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/service_worker/embedded_worker_context_client.cc View 1 1 chunk +13 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_script_context.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_script_context.cc View 1 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (5 generated)
horo
michaeln@ Could you please review this? Thank you!
5 years, 10 months ago (2015-02-17 13:18:19 UTC) #2
michaeln
lgtm modulo nits https://codereview.chromium.org/931173002/diff/1/content/browser/service_worker/service_worker_script_cache_map.h File content/browser/service_worker/service_worker_script_cache_map.h (right): https://codereview.chromium.org/931173002/diff/1/content/browser/service_worker/service_worker_script_cache_map.h#newcode80 content/browser/service_worker/service_worker_script_cache_map.h:80: int); name the last arg https://codereview.chromium.org/931173002/diff/1/content/common/service_worker/service_worker_messages.h ...
5 years, 10 months ago (2015-02-18 03:37:34 UTC) #3
horo
Thank you! https://codereview.chromium.org/931173002/diff/1/content/browser/service_worker/service_worker_script_cache_map.h File content/browser/service_worker/service_worker_script_cache_map.h (right): https://codereview.chromium.org/931173002/diff/1/content/browser/service_worker/service_worker_script_cache_map.h#newcode80 content/browser/service_worker/service_worker_script_cache_map.h:80: int); On 2015/02/18 03:37:34, michaeln wrote: > ...
5 years, 10 months ago (2015-02-18 04:17:06 UTC) #5
horo
wfh@ Could you please review content/common/service_worker/service_worker_messages.h?
5 years, 10 months ago (2015-02-18 04:58:58 UTC) #7
Will Harris
This concerns me, maybe I need more explanation but it looks like it allows any ...
5 years, 10 months ago (2015-02-18 06:00:34 UTC) #8
horo
On 2015/02/18 06:00:34, Will Harris wrote: > This concerns me, maybe I need more explanation ...
5 years, 10 months ago (2015-02-18 06:29:34 UTC) #9
michaeln
https://codereview.chromium.org/931173002/diff/1/content/common/service_worker/service_worker_messages.h File content/common/service_worker/service_worker_messages.h (right): https://codereview.chromium.org/931173002/diff/1/content/common/service_worker/service_worker_messages.h#newcode237 content/common/service_worker/service_worker_messages.h:237: std::vector<char> /* data */) I guess I meant how ...
5 years, 10 months ago (2015-02-18 19:17:00 UTC) #10
michaeln
> On 2015/02/18 06:00:34, Will Harris wrote: > > This concerns me, maybe I need ...
5 years, 10 months ago (2015-02-18 19:22:01 UTC) #11
horo
> This is only done for the main script resource so the url param actually ...
5 years, 10 months ago (2015-02-19 00:08:43 UTC) #13
Tom Sepez
On 2015/02/18 06:29:34, horo wrote: > On 2015/02/18 06:00:34, Will Harris wrote: > > This ...
5 years, 10 months ago (2015-02-19 22:16:14 UTC) #14
horo
On 2015/02/19 22:16:14, Tom Sepez wrote: > On 2015/02/18 06:29:34, horo wrote: > > On ...
5 years, 10 months ago (2015-02-19 23:07:38 UTC) #15
Will Harris
On 2015/02/19 23:07:38, horo wrote: > The service worker for site A can't access to ...
5 years, 10 months ago (2015-02-19 23:55:14 UTC) #16
horo
On 2015/02/19 23:55:14, Will Harris wrote: > On 2015/02/19 23:07:38, horo wrote: > > > ...
5 years, 10 months ago (2015-02-20 00:37:59 UTC) #17
Will Harris
On 2015/02/20 00:37:59, horo wrote: > Ah! Yes. > EmbeddedWorkerRegistry doesn't check the process id. ...
5 years, 10 months ago (2015-02-20 22:46:17 UTC) #18
horo
On 2015/02/20 22:46:17, Will Harris wrote: > On 2015/02/20 00:37:59, horo wrote: > > Ah! ...
5 years, 10 months ago (2015-02-20 22:47:30 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/931173002/100001
5 years, 10 months ago (2015-02-20 22:48:30 UTC) #21
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 10 months ago (2015-02-20 23:40:51 UTC) #22
commit-bot: I haz the power
5 years, 10 months ago (2015-02-20 23:42:45 UTC) #23
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/c514247c033d77fff1481a94fc923c907baa3fe5
Cr-Commit-Position: refs/heads/master@{#317441}

Powered by Google App Engine
This is Rietveld 408576698