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

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

Issue 2771823002: Implement updateViaCache flag and no-cache by default for main service worker scripts
Patch Set: Created 3 years, 9 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: ";
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 state(blink::WebServiceWorkerStateUnknown), 130 state(blink::WebServiceWorkerStateUnknown),
131 version_id(kInvalidServiceWorkerVersionId) {} 131 version_id(kInvalidServiceWorkerVersionId) {}
132 132
133 bool ServiceWorkerObjectInfo::IsValid() const { 133 bool ServiceWorkerObjectInfo::IsValid() const {
134 return handle_id != kInvalidServiceWorkerHandleId && 134 return handle_id != kInvalidServiceWorkerHandleId &&
135 version_id != kInvalidServiceWorkerVersionId; 135 version_id != kInvalidServiceWorkerVersionId;
136 } 136 }
137 137
138 ServiceWorkerRegistrationObjectInfo::ServiceWorkerRegistrationObjectInfo() 138 ServiceWorkerRegistrationObjectInfo::ServiceWorkerRegistrationObjectInfo()
139 : handle_id(kInvalidServiceWorkerRegistrationHandleId), 139 : handle_id(kInvalidServiceWorkerRegistrationHandleId),
140 registration_id(kInvalidServiceWorkerRegistrationId) { 140 use_cache(false),
141 } 141 registration_id(kInvalidServiceWorkerRegistrationId) {}
142 142
143 ServiceWorkerClientQueryOptions::ServiceWorkerClientQueryOptions() 143 ServiceWorkerClientQueryOptions::ServiceWorkerClientQueryOptions()
144 : client_type(blink::WebServiceWorkerClientTypeWindow), 144 : client_type(blink::WebServiceWorkerClientTypeWindow),
145 include_uncontrolled(false) { 145 include_uncontrolled(false) {
146 } 146 }
147 147
148 ExtendableMessageEventSource::ExtendableMessageEventSource() {} 148 ExtendableMessageEventSource::ExtendableMessageEventSource() {}
149 149
150 ExtendableMessageEventSource::ExtendableMessageEventSource( 150 ExtendableMessageEventSource::ExtendableMessageEventSource(
151 const ServiceWorkerClientInfo& client_info) 151 const ServiceWorkerClientInfo& client_info)
152 : client_info(client_info) {} 152 : client_info(client_info) {}
153 153
154 ExtendableMessageEventSource::ExtendableMessageEventSource( 154 ExtendableMessageEventSource::ExtendableMessageEventSource(
155 const ServiceWorkerObjectInfo& service_worker_info) 155 const ServiceWorkerObjectInfo& service_worker_info)
156 : service_worker_info(service_worker_info) {} 156 : service_worker_info(service_worker_info) {}
157 157
158 NavigationPreloadState::NavigationPreloadState() 158 NavigationPreloadState::NavigationPreloadState()
159 : enabled(false), header("true") {} 159 : enabled(false), header("true") {}
160 160
161 NavigationPreloadState::NavigationPreloadState(bool enabled, std::string header) 161 NavigationPreloadState::NavigationPreloadState(bool enabled, std::string header)
162 : enabled(enabled), header(header) {} 162 : enabled(enabled), header(header) {}
163 163
164 NavigationPreloadState::NavigationPreloadState( 164 NavigationPreloadState::NavigationPreloadState(
165 const NavigationPreloadState& other) = default; 165 const NavigationPreloadState& other) = default;
166 166
167 } // namespace content 167 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698