| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_provider_host_info.h" | 5 #include "content/common/service_worker/service_worker_provider_host_info.h" |
| 6 | 6 |
| 7 #include "ipc/ipc_message.h" |
| 8 |
| 7 namespace content { | 9 namespace content { |
| 8 | 10 |
| 9 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo() {} | 11 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo() |
| 12 : provider_id(kInvalidServiceWorkerProviderId), |
| 13 route_id(MSG_ROUTING_NONE), |
| 14 type(SERVICE_WORKER_PROVIDER_UNKNOWN), |
| 15 is_parent_frame_secure(false) {} |
| 10 | 16 |
| 11 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( | 17 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( |
| 12 ServiceWorkerProviderHostInfo&& other) | 18 ServiceWorkerProviderHostInfo&& other) |
| 13 : provider_id(other.provider_id), | 19 : provider_id(other.provider_id), |
| 14 route_id(other.route_id), | 20 route_id(other.route_id), |
| 15 type(other.type), | 21 type(other.type), |
| 16 is_parent_frame_secure(other.is_parent_frame_secure) {} | 22 is_parent_frame_secure(other.is_parent_frame_secure), |
| 23 host_request(std::move(other.host_request)), |
| 24 client_ptr_info(std::move(other.client_ptr_info)) {} |
| 25 |
| 26 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( |
| 27 ServiceWorkerProviderHostInfo&& other, |
| 28 mojom::ServiceWorkerProviderHostAssociatedRequest host_request, |
| 29 mojom::ServiceWorkerProviderAssociatedPtrInfo client_ptr_info) |
| 30 : provider_id(other.provider_id), |
| 31 route_id(other.route_id), |
| 32 type(other.type), |
| 33 is_parent_frame_secure(other.is_parent_frame_secure), |
| 34 host_request(std::move(host_request)), |
| 35 client_ptr_info(std::move(client_ptr_info)) { |
| 36 DCHECK(!other.host_request.is_pending()); |
| 37 DCHECK(!other.client_ptr_info.is_valid()); |
| 38 other.provider_id = kInvalidServiceWorkerProviderId; |
| 39 other.route_id = MSG_ROUTING_NONE; |
| 40 other.type = SERVICE_WORKER_PROVIDER_UNKNOWN; |
| 41 other.is_parent_frame_secure = false; |
| 42 } |
| 17 | 43 |
| 18 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( | 44 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( |
| 19 int provider_id, | 45 int provider_id, |
| 20 int route_id, | 46 int route_id, |
| 21 ServiceWorkerProviderType type, | 47 ServiceWorkerProviderType type, |
| 22 bool is_parent_frame_secure) | 48 bool is_parent_frame_secure) |
| 23 : provider_id(provider_id), | 49 : provider_id(provider_id), |
| 24 route_id(route_id), | 50 route_id(route_id), |
| 25 type(type), | 51 type(type), |
| 26 is_parent_frame_secure(is_parent_frame_secure) {} | 52 is_parent_frame_secure(is_parent_frame_secure) {} |
| 27 | 53 |
| 28 ServiceWorkerProviderHostInfo::~ServiceWorkerProviderHostInfo() {} | 54 ServiceWorkerProviderHostInfo::~ServiceWorkerProviderHostInfo() {} |
| 29 | 55 |
| 30 } // namespace content | 56 } // namespace content |
| OLD | NEW |