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

Issue 615493003: [ServiceWorker] Plumbing the request credentials mode to the ServiceWorker. [2/2 chromium] (Closed)

Created:
6 years, 2 months ago by horo
Modified:
6 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+serviceworker, michaeln, mkwst+moarreviews-renderer_chromium.org, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[ServiceWorker] Plumbing the request credentials mode to the ServiceWorker. [2/2 chromium] Currently the credentials mode of the FetchEvent's request is always 'omit'. But this should be 'same-origin' or 'include'. ex: - <img src="./test.png"> mode: no CORS credentials mode: same-origin - <img src="./test.png" crossOrigin="anonymous"> mode: CORS credentials mode: same-origin - <img src="./test.png" crossOrigin="use-credentials"> mode: CORS credentials mode: include [1/2] blink: https://codereview.chromium.org/610403002/ [2/2] chromium: https://codereview.chromium.org/615493003/ This value is passed from the renederer to the ServiceWorker in the following steps. In the renederer process: blink::ResourceRequest::setFetchCredentialsMode() // not called yet blink::ResourceRequest::m_fetchCredentialsMode content::WebURLLoaderImpl::Context::Start() blink::WebURLRequest::fetchCredentialsMode() GetFetchCredentialsMode() conetnt::RequestInfo::fetch_credentials_mode In the browser process: conetnt::RequestInfo::fetch_credentials_mode content::ResourceDispatcherHostImpl::BeginRequest() content::ServiceWorkerRequestHandler::InitializeHandler() content::ServiceWorkerProviderHost::CreateRequestHandler() content::ServiceWorkerControlleeRequestHandler::ServiceWorkerControlleeRequestHandler() content::ServiceWorkerControlleeRequestHandler::request_credentials_mode_ content::ServiceWorkerControlleeRequestHandler::MaybeCreateJob() content::ServiceWorkerURLRequestJob::ServiceWorkerURLRequestJob() content::ServiceWorkerURLRequestJob::request_credentials_mode_ content::ServiceWorkerURLRequestJob::CreateFetchRequest() content::ServiceWorkerFetchRequest::credentials_mode In the ServiceWorker process: content::ServiceWorkerFetchRequest::credentials_mode content::ServiceWorkerScriptContext::OnFetchEvent() GetBlinkFetchRequestCredentialsMode() blink::WebServiceWorkerRequest::setCredentialsMode() blink::WebServiceWorkerRequest::WebServiceWorkerRequestPrivate::m_credentialsMode blink::Request::create() blink::FetchRequestData::create() blink::FetchRequestData::m_credentials BUG=418509 Committed: https://crrev.com/89252e8f8b163ac1c8715882e3651aa79e6cbfb6 Cr-Commit-Position: refs/heads/master@{#297812}

Patch Set 1 #

Patch Set 2 : incorporated yhirano's comment in codereview.chromium.org/610403002 #

Patch Set 3 : fix GetFetchCredentialsMode #

Total comments: 8

Patch Set 4 : IPCResourceLoaderBridge::IPCResourceLoaderBridge() #

Patch Set 5 : -#include "net/base/load_flags.h" #

Patch Set 6 : Add TODO comment #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -3 lines) Patch
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler.h View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler.cc View 1 2 3 4 5 6 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler_unittest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job.h View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job.cc View 1 2 3 4 5 6 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/child/request_info.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/child/request_info.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/child/resource_dispatcher.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 4 5 6 3 chunks +15 lines, -0 lines 0 comments Download
M content/common/resource_messages.h View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/common/service_worker/service_worker_types.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_types.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M content/renderer/service_worker/service_worker_script_context.cc View 1 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (9 generated)
horo
yhirano@ Could you please review?
6 years, 2 months ago (2014-09-29 11:20:37 UTC) #2
yhirano
https://codereview.chromium.org/615493003/diff/60001/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/615493003/diff/60001/content/browser/service_worker/service_worker_url_request_job.cc#newcode21 content/browser/service_worker/service_worker_url_request_job.cc:21: #include "net/base/load_flags.h" Is this include directive needed? https://codereview.chromium.org/615493003/diff/60001/content/child/web_url_loader_impl.cc File ...
6 years, 2 months ago (2014-10-01 06:41:12 UTC) #4
horo
https://codereview.chromium.org/615493003/diff/60001/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/615493003/diff/60001/content/browser/service_worker/service_worker_url_request_job.cc#newcode21 content/browser/service_worker/service_worker_url_request_job.cc:21: #include "net/base/load_flags.h" On 2014/10/01 06:41:12, yhirano wrote: > Is ...
6 years, 2 months ago (2014-10-01 06:57:34 UTC) #5
yhirano
lgtm
6 years, 2 months ago (2014-10-01 07:59:47 UTC) #6
yhirano
Please update the description like the blink-side CL.
6 years, 2 months ago (2014-10-01 08:01:08 UTC) #7
horo
On 2014/10/01 08:01:08, yhirano wrote: > Please update the description like the blink-side CL. done
6 years, 2 months ago (2014-10-01 08:02:49 UTC) #8
horo
jochen@ Could you please review this? Thank you.
6 years, 2 months ago (2014-10-01 08:03:52 UTC) #10
Mike West
Drive-by LGTM. You'll need approval for the IPC change; Tom, would you mind signing off ...
6 years, 2 months ago (2014-10-01 08:27:20 UTC) #12
horo
https://codereview.chromium.org/615493003/diff/60001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/615493003/diff/60001/content/child/web_url_loader_impl.cc#newcode410 content/child/web_url_loader_impl.cc:410: On 2014/10/01 08:27:20, Mike West wrote: > On 2014/10/01 ...
6 years, 2 months ago (2014-10-01 08:36:02 UTC) #13
Tom Sepez
Messages LGTM.
6 years, 2 months ago (2014-10-01 17:17:08 UTC) #14
jochen (gone - plz use gerrit)
lgtm
6 years, 2 months ago (2014-10-02 07:35:56 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/615493003/140001
6 years, 2 months ago (2014-10-02 10:39:57 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/20017)
6 years, 2 months ago (2014-10-02 10:51:59 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/615493003/140001
6 years, 2 months ago (2014-10-02 10:55:21 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/20028)
6 years, 2 months ago (2014-10-02 11:08:53 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/615493003/140001
6 years, 2 months ago (2014-10-02 11:22:25 UTC) #25
commit-bot: I haz the power
Committed patchset #7 (id:140001) as 9a4165b157b2f35e3f1aed1fcf5574f0167ed943
6 years, 2 months ago (2014-10-02 12:03:53 UTC) #26
commit-bot: I haz the power
6 years, 2 months ago (2014-10-02 12:04:28 UTC) #27
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/89252e8f8b163ac1c8715882e3651aa79e6cbfb6
Cr-Commit-Position: refs/heads/master@{#297812}

Powered by Google App Engine
This is Rietveld 408576698