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" | 7 #include "ipc/ipc_message.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 : provider_id(kInvalidServiceWorkerProviderId), | 23 : provider_id(kInvalidServiceWorkerProviderId), |
24 route_id(MSG_ROUTING_NONE), | 24 route_id(MSG_ROUTING_NONE), |
25 type(SERVICE_WORKER_PROVIDER_UNKNOWN), | 25 type(SERVICE_WORKER_PROVIDER_UNKNOWN), |
26 is_parent_frame_secure(false) {} | 26 is_parent_frame_secure(false) {} |
27 | 27 |
28 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( | 28 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( |
29 ServiceWorkerProviderHostInfo&& other) | 29 ServiceWorkerProviderHostInfo&& other) |
30 : provider_id(other.provider_id), | 30 : provider_id(other.provider_id), |
31 route_id(other.route_id), | 31 route_id(other.route_id), |
32 type(other.type), | 32 type(other.type), |
33 is_parent_frame_secure(other.is_parent_frame_secure) { | 33 is_parent_frame_secure(other.is_parent_frame_secure), |
| 34 host_request(std::move(other.host_request)), |
| 35 client_ptr_info(std::move(other.client_ptr_info)) { |
34 SetDefaultValues(&other); | 36 SetDefaultValues(&other); |
35 } | 37 } |
36 | 38 |
| 39 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( |
| 40 ServiceWorkerProviderHostInfo&& other, |
| 41 mojom::ServiceWorkerProviderHostAssociatedRequest host_request, |
| 42 mojom::ServiceWorkerProviderAssociatedPtrInfo client_ptr_info) |
| 43 : provider_id(other.provider_id), |
| 44 route_id(other.route_id), |
| 45 type(other.type), |
| 46 is_parent_frame_secure(other.is_parent_frame_secure), |
| 47 host_request(std::move(host_request)), |
| 48 client_ptr_info(std::move(client_ptr_info)) { |
| 49 DCHECK(!other.host_request.is_pending()); |
| 50 DCHECK(!other.client_ptr_info.is_valid()); |
| 51 SetDefaultValues(&other); |
| 52 } |
| 53 |
37 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( | 54 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( |
38 int provider_id, | 55 int provider_id, |
39 int route_id, | 56 int route_id, |
40 ServiceWorkerProviderType type, | 57 ServiceWorkerProviderType type, |
41 bool is_parent_frame_secure) | 58 bool is_parent_frame_secure) |
42 : provider_id(provider_id), | 59 : provider_id(provider_id), |
43 route_id(route_id), | 60 route_id(route_id), |
44 type(type), | 61 type(type), |
45 is_parent_frame_secure(is_parent_frame_secure) {} | 62 is_parent_frame_secure(is_parent_frame_secure) {} |
46 | 63 |
47 ServiceWorkerProviderHostInfo::~ServiceWorkerProviderHostInfo() {} | 64 ServiceWorkerProviderHostInfo::~ServiceWorkerProviderHostInfo() {} |
48 | 65 |
49 ServiceWorkerProviderHostInfo& ServiceWorkerProviderHostInfo::operator=( | 66 ServiceWorkerProviderHostInfo& ServiceWorkerProviderHostInfo::operator=( |
50 ServiceWorkerProviderHostInfo&& other) { | 67 ServiceWorkerProviderHostInfo&& other) { |
51 provider_id = other.provider_id; | 68 provider_id = other.provider_id; |
52 route_id = other.route_id; | 69 route_id = other.route_id; |
53 type = other.type; | 70 type = other.type; |
54 is_parent_frame_secure = other.is_parent_frame_secure; | 71 is_parent_frame_secure = other.is_parent_frame_secure; |
55 | 72 |
56 SetDefaultValues(&other); | 73 SetDefaultValues(&other); |
57 return *this; | 74 return *this; |
58 } | 75 } |
59 | 76 |
60 } // namespace content | 77 } // namespace content |
OLD | NEW |