|
Introduce url_list to the Response scheme of CacheStorage.
According to the spec, the CacheStorage has to store the URL list of responses.
https://github.com/w3c/ServiceWorker/issues/737#issuecomment-175844226
So this cl introduces url_list to the Response scheme of CacheStorage, and pass
it from FetchManager::Loader to CacheStorage and ServiceWorkerURLRequestJob and
ResourceResponse.
To let FetchManager::Loader know the URL list, this cl introduces
ThreadableLoaderClient::didReceiveRedirectTo(). DocumentThreadableLoader calls
didReceiveRedirectTo() when it received a redirect response.
- If fetch() in called on the main thread, FetchManager::Loader's
didReceiveRedirectTo() is called directly from DocumentThreadableLoader.
- If fetch() is called on the worker thread, FetchManager::Loader's
didReceiveRedirectTo() is called via WorkerThreadableLoader::
MainThreadLoaderHolder.
And FetchManager::Loader::didReceiveResponse() sets the URL list to
FetchResponseData.
When FetchEvent.respondWith(response) is called in the SW, the URL list is
passed to ServiceWorkerURLRequestJob via blink::WebServiceWorkerResponse and
content::ServiceWorkerResponse. And when the browser process sends the response
to the controlled page, the URL list is passed via content::ResourceResponseInfo
and blink::WebURLResponse and blink::ResourceResponse.
If Cache.put(request, response) is called, the URL list is passed to
CacheStorageCache::Put() via blink::WebServiceWorkerResponse and
content::ServiceWorkerResponse. And it converts the list to the protobuf and
save to the storage.
When Cache.match(request) returns the response to the renderer process, the URL
list is read from the protobuf in the storage and passed via
content::ServiceWorkerResponse and blink::WebServiceWorkerResponse to the
renderer process.
BUG= 658249
Committed: https://crrev.com/756089ad4639bb917faac4b2f6a83c16370f10b6
Cr-Commit-Position: refs/heads/master@{#437241}
Total comments: 30
Total comments: 16
Total comments: 10
Total comments: 6
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+439 lines, -271 lines) |
Patch |
|
M |
content/browser/cache_storage/cache_storage.proto
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
content/browser/cache_storage/cache_storage_cache.cc
|
View
|
1
2
|
3 chunks |
+27 lines, -20 lines |
0 comments
|
Download
|
|
M |
content/browser/cache_storage/cache_storage_cache_unittest.cc
|
View
|
1
2
3
|
6 chunks |
+59 lines, -38 lines |
0 comments
|
Download
|
|
M |
content/browser/cache_storage/cache_storage_manager_unittest.cc
|
View
|
1
2
|
1 chunk |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/browser/service_worker/embedded_worker_test_helper.cc
|
View
|
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/browser/service_worker/service_worker_response_info.h
|
View
|
1
2
|
4 chunks |
+14 lines, -9 lines |
0 comments
|
Download
|
|
M |
content/browser/service_worker/service_worker_response_info.cc
|
View
|
|
4 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
content/browser/service_worker/service_worker_url_request_job.h
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
content/browser/service_worker/service_worker_url_request_job.cc
|
View
|
1
2
3
4
|
3 chunks |
+9 lines, -8 lines |
0 comments
|
Download
|
|
M |
content/browser/service_worker/service_worker_url_request_job_unittest.cc
|
View
|
1
2
3
4
|
17 chunks |
+41 lines, -31 lines |
0 comments
|
Download
|
|
M |
content/child/web_url_loader_impl.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
content/common/resource_messages.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/common/service_worker/service_worker_messages.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/common/service_worker/service_worker_types.h
|
View
|
|
3 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/common/service_worker/service_worker_types.cc
|
View
|
|
3 chunks |
+11 lines, -9 lines |
0 comments
|
Download
|
|
M |
content/public/common/resource_response.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/public/common/resource_response_info.h
|
View
|
1
2
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/renderer/cache_storage/cache_storage_dispatcher.cc
|
View
|
1
2
3
4
5
6
|
3 chunks |
+6 lines, -21 lines |
0 comments
|
Download
|
|
M |
content/renderer/service_worker/service_worker_context_client.cc
|
View
|
1
2
3
|
2 chunks |
+3 lines, -15 lines |
0 comments
|
Download
|
|
M |
content/renderer/service_worker/service_worker_type_util.h
|
View
|
1
|
1 chunk |
+2 lines, -7 lines |
0 comments
|
Download
|
|
M |
content/renderer/service_worker/service_worker_type_util.cc
|
View
|
1
2
|
3 chunks |
+38 lines, -16 lines |
0 comments
|
Download
|
|
M |
media/blink/multibuffer_data_source_unittest.cc
|
View
|
1
2
3
|
5 chunks |
+10 lines, -5 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
|
View
|
1
2
3
4
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/loader/ThreadableLoaderClient.h
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
|
View
|
|
3 chunks |
+21 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp
|
View
|
1
2
3
4
|
4 chunks |
+15 lines, -7 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/fetch/FetchManager.cpp
|
View
|
1
2
3
4
5
|
6 chunks |
+20 lines, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/fetch/FetchResponseData.h
|
View
|
|
4 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp
|
View
|
|
6 chunks |
+17 lines, -6 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/fetch/FetchResponseDataTest.cpp
|
View
|
1
2
|
3 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/fetch/Response.cpp
|
View
|
1
2
3
4
5
|
2 chunks |
+11 lines, -4 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/fetch/ResponseTest.cpp
|
View
|
1
2
3
4
5
|
9 chunks |
+24 lines, -10 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp
|
View
|
1
2
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/exported/WebServiceWorkerResponse.cpp
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/exported/WebURLResponse.cpp
|
View
|
1
|
2 chunks |
+12 lines, -7 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/network/ResourceResponse.h
|
View
|
1
2
3
|
3 chunks |
+13 lines, -9 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/network/ResourceResponse.cpp
|
View
|
|
3 chunks |
+12 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/public/platform/WebURLResponse.h
|
View
|
1
2
|
2 chunks |
+11 lines, -6 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerResponse.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 101 (75 generated)
|