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

Side by Side Diff: content/common/service_worker/service_worker_types.cc

Issue 1597383002: Service Worker: (Re-commit) Add FetchEvent.clientId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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 kServiceWorkerUpdateErrorPrefix[] = 11 const char kServiceWorkerUpdateErrorPrefix[] =
12 "Failed to update a ServiceWorker: "; 12 "Failed to update a ServiceWorker: ";
13 const char kServiceWorkerUnregisterErrorPrefix[] = 13 const char kServiceWorkerUnregisterErrorPrefix[] =
14 "Failed to unregister a ServiceWorkerRegistration: "; 14 "Failed to unregister a ServiceWorkerRegistration: ";
15 const char kServiceWorkerGetRegistrationErrorPrefix[] = 15 const char kServiceWorkerGetRegistrationErrorPrefix[] =
16 "Failed to get a ServiceWorkerRegistration: "; 16 "Failed to get a ServiceWorkerRegistration: ";
17 const char kServiceWorkerGetRegistrationsErrorPrefix[] = 17 const char kServiceWorkerGetRegistrationsErrorPrefix[] =
18 "Failed to get ServiceWorkerRegistration objects: "; 18 "Failed to get ServiceWorkerRegistration objects: ";
19 const char kFetchScriptError[] = 19 const char kFetchScriptError[] =
20 "An unknown error occurred when fetching the script."; 20 "An unknown error occurred when fetching the script.";
21 21
22 ServiceWorkerFetchRequest::ServiceWorkerFetchRequest() 22 ServiceWorkerFetchRequest::ServiceWorkerFetchRequest()
23 : mode(FETCH_REQUEST_MODE_NO_CORS), 23 : mode(FETCH_REQUEST_MODE_NO_CORS),
24 is_main_resource_load(false),
jungkees 2016/01/18 10:04:32 This line fixes the use-of-uninitialized-value war
24 request_context_type(REQUEST_CONTEXT_TYPE_UNSPECIFIED), 25 request_context_type(REQUEST_CONTEXT_TYPE_UNSPECIFIED),
25 frame_type(REQUEST_CONTEXT_FRAME_TYPE_NONE), 26 frame_type(REQUEST_CONTEXT_FRAME_TYPE_NONE),
26 blob_size(0), 27 blob_size(0),
27 credentials_mode(FETCH_CREDENTIALS_MODE_OMIT), 28 credentials_mode(FETCH_CREDENTIALS_MODE_OMIT),
28 redirect_mode(FetchRedirectMode::FOLLOW_MODE), 29 redirect_mode(FetchRedirectMode::FOLLOW_MODE),
29 is_reload(false) {} 30 is_reload(false) {}
30 31
31 ServiceWorkerFetchRequest::ServiceWorkerFetchRequest( 32 ServiceWorkerFetchRequest::ServiceWorkerFetchRequest(
32 const GURL& url, 33 const GURL& url,
33 const std::string& method, 34 const std::string& method,
34 const ServiceWorkerHeaderMap& headers, 35 const ServiceWorkerHeaderMap& headers,
35 const Referrer& referrer, 36 const Referrer& referrer,
36 bool is_reload) 37 bool is_reload)
37 : mode(FETCH_REQUEST_MODE_NO_CORS), 38 : mode(FETCH_REQUEST_MODE_NO_CORS),
39 is_main_resource_load(false),
jungkees 2016/01/18 10:04:32 This line fixes the use-of-uninitialized-value war
38 request_context_type(REQUEST_CONTEXT_TYPE_UNSPECIFIED), 40 request_context_type(REQUEST_CONTEXT_TYPE_UNSPECIFIED),
39 frame_type(REQUEST_CONTEXT_FRAME_TYPE_NONE), 41 frame_type(REQUEST_CONTEXT_FRAME_TYPE_NONE),
40 url(url), 42 url(url),
41 method(method), 43 method(method),
42 headers(headers), 44 headers(headers),
43 blob_size(0), 45 blob_size(0),
44 referrer(referrer), 46 referrer(referrer),
45 credentials_mode(FETCH_CREDENTIALS_MODE_OMIT), 47 credentials_mode(FETCH_CREDENTIALS_MODE_OMIT),
46 redirect_mode(FetchRedirectMode::FOLLOW_MODE), 48 redirect_mode(FetchRedirectMode::FOLLOW_MODE),
47 is_reload(is_reload) {} 49 is_reload(is_reload) {}
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 : handle_id(kInvalidServiceWorkerRegistrationHandleId), 88 : handle_id(kInvalidServiceWorkerRegistrationHandleId),
87 registration_id(kInvalidServiceWorkerRegistrationId) { 89 registration_id(kInvalidServiceWorkerRegistrationId) {
88 } 90 }
89 91
90 ServiceWorkerClientQueryOptions::ServiceWorkerClientQueryOptions() 92 ServiceWorkerClientQueryOptions::ServiceWorkerClientQueryOptions()
91 : client_type(blink::WebServiceWorkerClientTypeWindow), 93 : client_type(blink::WebServiceWorkerClientTypeWindow),
92 include_uncontrolled(false) { 94 include_uncontrolled(false) {
93 } 95 }
94 96
95 } // namespace content 97 } // namespace content
OLDNEW
« no previous file with comments | « content/common/service_worker/service_worker_types.h ('k') | content/renderer/service_worker/service_worker_context_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698