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

Side by Side Diff: content/common/service_worker/service_worker_types.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/service_worker/service_worker_types.h" 5 #include "content/common/service_worker/service_worker_types.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 const char kServiceWorkerRegisterErrorPrefix[] = 9 const char kServiceWorkerRegisterErrorPrefix[] =
10 "Failed to register a ServiceWorker: "; 10 "Failed to register a ServiceWorker: ";
11 const char kServiceWorkerUnregisterErrorPrefix[] = 11 const char kServiceWorkerUnregisterErrorPrefix[] =
12 "Failed to unregister a ServiceWorkerRegistration: "; 12 "Failed to unregister a ServiceWorkerRegistration: ";
13 const char kServiceWorkerGetRegistrationErrorPrefix[] = 13 const char kServiceWorkerGetRegistrationErrorPrefix[] =
14 "Failed to get a ServiceWorkerRegistration: "; 14 "Failed to get a ServiceWorkerRegistration: ";
15 const char kFetchScriptError[] = 15 const char kFetchScriptError[] =
16 "An unknown error occurred when fetching the script."; 16 "An unknown error occurred when fetching the script.";
17 17
18 ServiceWorkerFetchRequest::ServiceWorkerFetchRequest() 18 ServiceWorkerFetchRequest::ServiceWorkerFetchRequest()
19 : mode(FETCH_REQUEST_MODE_NO_CORS), 19 : mode(FETCH_REQUEST_MODE_NO_CORS),
20 request_context_type(REQUEST_CONTEXT_TYPE_UNSPECIFIED), 20 request_context_type(REQUEST_CONTEXT_TYPE_UNSPECIFIED),
21 frame_type(REQUEST_CONTEXT_FRAME_TYPE_NONE), 21 frame_type(REQUEST_CONTEXT_FRAME_TYPE_NONE),
22 blob_size(0), 22 blob_size(0),
23 credentials_mode(FETCH_CREDENTIALS_MODE_OMIT), 23 credentials_mode(FETCH_CREDENTIALS_MODE_OMIT),
24 is_reload(false) { 24 is_reload(false),
25 client(ServiceWorkerClientInfo()) {
25 } 26 }
26 27
27 ServiceWorkerFetchRequest::ServiceWorkerFetchRequest( 28 ServiceWorkerFetchRequest::ServiceWorkerFetchRequest(
28 const GURL& url, 29 const GURL& url,
29 const std::string& method, 30 const std::string& method,
30 const ServiceWorkerHeaderMap& headers, 31 const ServiceWorkerHeaderMap& headers,
31 const Referrer& referrer, 32 const Referrer& referrer,
32 bool is_reload) 33 bool is_reload,
34 const ServiceWorkerClientInfo& client)
33 : mode(FETCH_REQUEST_MODE_NO_CORS), 35 : mode(FETCH_REQUEST_MODE_NO_CORS),
34 request_context_type(REQUEST_CONTEXT_TYPE_UNSPECIFIED), 36 request_context_type(REQUEST_CONTEXT_TYPE_UNSPECIFIED),
35 frame_type(REQUEST_CONTEXT_FRAME_TYPE_NONE), 37 frame_type(REQUEST_CONTEXT_FRAME_TYPE_NONE),
36 url(url), 38 url(url),
37 method(method), 39 method(method),
38 headers(headers), 40 headers(headers),
39 blob_size(0), 41 blob_size(0),
40 referrer(referrer), 42 referrer(referrer),
41 credentials_mode(FETCH_CREDENTIALS_MODE_OMIT), 43 credentials_mode(FETCH_CREDENTIALS_MODE_OMIT),
42 is_reload(is_reload) { 44 is_reload(is_reload),
45 client(client) {
43 } 46 }
44 47
45 ServiceWorkerFetchRequest::~ServiceWorkerFetchRequest() {} 48 ServiceWorkerFetchRequest::~ServiceWorkerFetchRequest() {}
46 49
47 ServiceWorkerResponse::ServiceWorkerResponse() 50 ServiceWorkerResponse::ServiceWorkerResponse()
48 : status_code(0), 51 : status_code(0),
49 response_type(blink::WebServiceWorkerResponseTypeOpaque), 52 response_type(blink::WebServiceWorkerResponseTypeOpaque),
50 blob_size(0) { 53 blob_size(0) {
51 } 54 }
52 55
(...skipping 27 matching lines...) Expand all
80 : handle_id(kInvalidServiceWorkerRegistrationHandleId), 83 : handle_id(kInvalidServiceWorkerRegistrationHandleId),
81 registration_id(kInvalidServiceWorkerRegistrationId) { 84 registration_id(kInvalidServiceWorkerRegistrationId) {
82 } 85 }
83 86
84 ServiceWorkerClientQueryOptions::ServiceWorkerClientQueryOptions() 87 ServiceWorkerClientQueryOptions::ServiceWorkerClientQueryOptions()
85 : client_type(blink::WebServiceWorkerClientTypeWindow), 88 : client_type(blink::WebServiceWorkerClientTypeWindow),
86 include_uncontrolled(false) { 89 include_uncontrolled(false) {
87 } 90 }
88 91
89 } // namespace content 92 } // namespace content
OLDNEW
« no previous file with comments | « content/common/service_worker/service_worker_types.h ('k') | content/renderer/cache_storage/cache_storage_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698