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

Issue 587213003: [ServiceWorker] Plumbing the request mode from the renderer to the ServiceWorker. [1/2 blink] (Closed)

Created:
6 years, 3 months ago by horo
Modified:
6 years, 2 months ago
CC:
abarth-chromium, blink-reviews, dglazkov+blink, falken, gavinp+loader_chromium.org, horo+watch_chromium.org, jamesr, Nate Chapin, jsbell+serviceworker_chromium.org, kinuko+serviceworker, michaeln, mkwst+moarreviews_chromium.org, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

[ServiceWorker] Plumbing the request mode from the renderer to the ServiceWorker. [1/2 blink] [1/2] blink: https://codereview.chromium.org/587213003/ [2/2] chromium: https://codereview.chromium.org/588153002/ This value is passed from the renederer to the ServiceWorker in the following steps. In the renederer process: blink::ResourceRequest::setFetchRequestMode() blink::ResourceRequest::m_fetchRequestMode content::WebURLLoaderImpl::Context::Start() blink::WebURLRequest::fetchRequestMode() GetFetchRequestMode() conetnt::RequestInfo::service_worker_request_mode In the browser process: conetnt::RequestInfo::service_worker_request_mode content::ResourceDispatcherHostImpl::BeginRequest() content::ServiceWorkerRequestHandler::InitializeHandler() content::ServiceWorkerProviderHost::CreateRequestHandler() content::ServiceWorkerControlleeRequestHandler::ServiceWorkerControlleeRequestHandler() content::ServiceWorkerControlleeRequestHandler::request_mode_ content::ServiceWorkerControlleeRequestHandler::MaybeCreateJob() content::ServiceWorkerURLRequestJob::ServiceWorkerURLRequestJob() content::ServiceWorkerURLRequestJob::request_mode_ content::ServiceWorkerURLRequestJob::CreateFetchRequest() content::ServiceWorkerFetchRequest::mode In the ServiceWorker process: content::ServiceWorkerFetchRequest::mode content::ServiceWorkerScriptContext::OnFetchEvent() GetBlinkFetchRequestMode() blink::WebServiceWorkerRequest::setMode() blink::WebServiceWorkerRequest::WebServiceWorkerRequestPrivate::m_mode blink::ServiceWorkerGlobalScopeProxy::dispatchFetchEvent() blilnk::RespondWithObserver::create() blilnk::RespondWithObserver::m_requestMode blink::WebServiceWorkerRequest::WebServiceWorkerRequestPrivate::m_mode blink::Request::create() blink::FetchRequestData::create() blink::FetchRequestData::m_mode BUG=416371, 408507 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182885

Patch Set 1 #

Total comments: 2

Patch Set 2 : incorporated yhirano's comment #

Patch Set 3 : small fix #

Patch Set 4 : Add opaque and not NoCors check in RespondWithObserver::responseWasFulfilled. #

Total comments: 2

Patch Set 5 : wrap in 80 columns #

Total comments: 8

Patch Set 6 : incorporated mkwst's comment #

Patch Set 7 : git cl format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -8 lines) Patch
M Source/modules/serviceworkers/FetchRequestData.cpp View 1 2 2 chunks +18 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/RespondWithObserver.h View 1 3 chunks +4 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/RespondWithObserver.cpp View 1 2 3 4 2 chunks +13 lines, -4 lines 0 comments Download
M Source/modules/serviceworkers/Response.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M Source/platform/exported/WebServiceWorkerRequest.cpp View 1 2 3 4 5 2 chunks +15 lines, -1 line 0 comments Download
M Source/platform/exported/WebURLRequest.cpp View 1 1 chunk +10 lines, -0 lines 0 comments Download
M Source/platform/network/ResourceRequest.h View 1 2 3 4 5 6 3 chunks +11 lines, -0 lines 0 comments Download
M Source/platform/network/ResourceRequest.cpp View 1 2 3 4 5 3 chunks +3 lines, -0 lines 0 comments Download
M Source/platform/network/ResourceRequestTest.cpp View 1 5 chunks +5 lines, -0 lines 0 comments Download
M Source/web/ServiceWorkerGlobalScopeProxy.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M public/platform/WebServiceWorkerRequest.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M public/platform/WebURLRequest.h View 1 2 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
horo
yhirano@ Could you please review?
6 years, 3 months ago (2014-09-22 10:38:04 UTC) #2
yhirano
https://codereview.chromium.org/587213003/diff/1/public/platform/WebURLRequest.h File public/platform/WebURLRequest.h (right): https://codereview.chromium.org/587213003/diff/1/public/platform/WebURLRequest.h#newcode113 public/platform/WebURLRequest.h:113: enum ServiceWorkerRequestMode { Is this name appropriate? Having FetchRequestMode ...
6 years, 2 months ago (2014-09-25 02:08:44 UTC) #3
horo
https://codereview.chromium.org/587213003/diff/1/public/platform/WebURLRequest.h File public/platform/WebURLRequest.h (right): https://codereview.chromium.org/587213003/diff/1/public/platform/WebURLRequest.h#newcode113 public/platform/WebURLRequest.h:113: enum ServiceWorkerRequestMode { On 2014/09/25 02:08:44, yhirano wrote: > ...
6 years, 2 months ago (2014-09-25 03:55:18 UTC) #4
yhirano
lgtm https://codereview.chromium.org/587213003/diff/80001/Source/modules/serviceworkers/RespondWithObserver.cpp File Source/modules/serviceworkers/RespondWithObserver.cpp (right): https://codereview.chromium.org/587213003/diff/80001/Source/modules/serviceworkers/RespondWithObserver.cpp#newcode118 Source/modules/serviceworkers/RespondWithObserver.cpp:118: // "If either |response|'s type is |opaque| and ...
6 years, 2 months ago (2014-09-25 11:45:03 UTC) #6
horo
https://codereview.chromium.org/587213003/diff/80001/Source/modules/serviceworkers/RespondWithObserver.cpp File Source/modules/serviceworkers/RespondWithObserver.cpp (right): https://codereview.chromium.org/587213003/diff/80001/Source/modules/serviceworkers/RespondWithObserver.cpp#newcode118 Source/modules/serviceworkers/RespondWithObserver.cpp:118: // "If either |response|'s type is |opaque| and |request|'s ...
6 years, 2 months ago (2014-09-25 11:51:40 UTC) #7
Mike West
LGTM with a few nits. You'll still need a platform OWNER to take a closer ...
6 years, 2 months ago (2014-09-25 12:35:53 UTC) #9
horo
https://codereview.chromium.org/587213003/diff/100001/Source/modules/serviceworkers/FetchRequestData.cpp File Source/modules/serviceworkers/FetchRequestData.cpp (right): https://codereview.chromium.org/587213003/diff/100001/Source/modules/serviceworkers/FetchRequestData.cpp#newcode45 Source/modules/serviceworkers/FetchRequestData.cpp:45: request->setMode(FetchRequestData::SameOriginMode); On 2014/09/25 12:35:53, Mike West wrote: > I ...
6 years, 2 months ago (2014-09-25 14:02:17 UTC) #10
horo
jochen@ Could you review Source/platform/*, Source/web/* and public/platform/*? Thank you.
6 years, 2 months ago (2014-09-25 14:04:49 UTC) #12
jochen (gone - plz use gerrit)
lgtm
6 years, 2 months ago (2014-09-29 12:56:53 UTC) #13
jochen (gone - plz use gerrit)
actually, where is this going to be used? Why no tests?
6 years, 2 months ago (2014-09-29 13:00:01 UTC) #14
horo
On 2014/09/29 13:00:01, jochen wrote: > actually, where is this going to be used? Why ...
6 years, 2 months ago (2014-09-29 13:10:08 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/587213003/140001
6 years, 2 months ago (2014-09-30 02:19:28 UTC) #17
commit-bot: I haz the power
6 years, 2 months ago (2014-09-30 04:42:14 UTC) #18
Message was sent while issue was closed.
Committed patchset #7 (id:140001) as 182885

Powered by Google App Engine
This is Rietveld 408576698