| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |