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

Unified Diff: content/browser/service_worker/service_worker_url_request_job.cc

Issue 1108273002: Add Client Attribute to FetchEvent- Chromium Side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_url_request_job.cc
diff --git a/content/browser/service_worker/service_worker_url_request_job.cc b/content/browser/service_worker/service_worker_url_request_job.cc
index 7106aa8ea9891693057be16b428db94679cb2e06..1c078e5278d6f7694ee9fdf01b3bbc9681f6b69c 100644
--- a/content/browser/service_worker/service_worker_url_request_job.cc
+++ b/content/browser/service_worker/service_worker_url_request_job.cc
@@ -49,6 +49,7 @@ ServiceWorkerURLRequestJob::ServiceWorkerURLRequestJob(
bool is_main_resource_load,
RequestContextType request_context_type,
RequestContextFrameType frame_type,
+ const ServiceWorkerClientInfo& client_info,
scoped_refptr<ResourceRequestBody> body)
: net::URLRequestJob(request, network_delegate),
provider_host_(provider_host),
@@ -63,6 +64,7 @@ ServiceWorkerURLRequestJob::ServiceWorkerURLRequestJob(
is_main_resource_load_(is_main_resource_load),
request_context_type_(request_context_type),
frame_type_(frame_type),
+ client_info_(client_info),
fall_back_required_(false),
body_(body),
weak_factory_(this) {
@@ -377,6 +379,7 @@ ServiceWorkerURLRequestJob::CreateFetchRequest() {
request->frame_type = frame_type_;
request->url = request_->url();
request->method = request_->method();
+ request->client = client_info_;
const net::HttpRequestHeaders& headers = request_->extra_request_headers();
for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext();) {
if (ServiceWorkerContext::IsExcludedHeaderNameForFetchEvent(it.name()))

Powered by Google App Engine
This is Rietveld 408576698