Index: content/common/service_worker/service_worker_provider_host_info.cc |
diff --git a/content/common/service_worker/service_worker_provider_host_info.cc b/content/common/service_worker/service_worker_provider_host_info.cc |
index 04a18876e27c825fc2f5ca98ea9b1c45f78666a3..82d06c747180ad3a68b4d60c8cd79a39afc89376 100644 |
--- a/content/common/service_worker/service_worker_provider_host_info.cc |
+++ b/content/common/service_worker/service_worker_provider_host_info.cc |
@@ -4,16 +4,42 @@ |
#include "content/common/service_worker/service_worker_provider_host_info.h" |
+#include "ipc/ipc_message.h" |
+ |
namespace content { |
-ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo() {} |
+ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo() |
+ : provider_id(kInvalidServiceWorkerProviderId), |
+ route_id(MSG_ROUTING_NONE), |
+ type(SERVICE_WORKER_PROVIDER_UNKNOWN), |
+ is_parent_frame_secure(false) {} |
ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( |
ServiceWorkerProviderHostInfo&& other) |
: provider_id(other.provider_id), |
route_id(other.route_id), |
type(other.type), |
- is_parent_frame_secure(other.is_parent_frame_secure) {} |
+ is_parent_frame_secure(other.is_parent_frame_secure), |
+ host_request(std::move(other.host_request)), |
+ client_ptr_info(std::move(other.client_ptr_info)) {} |
+ |
+ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( |
+ ServiceWorkerProviderHostInfo&& other, |
+ mojom::ServiceWorkerProviderHostAssociatedRequest host_request, |
+ mojom::ServiceWorkerProviderAssociatedPtrInfo client_ptr_info) |
+ : provider_id(other.provider_id), |
+ route_id(other.route_id), |
+ type(other.type), |
+ is_parent_frame_secure(other.is_parent_frame_secure), |
+ host_request(std::move(host_request)), |
+ client_ptr_info(std::move(client_ptr_info)) { |
+ DCHECK(!other.host_request.is_pending()); |
+ DCHECK(!other.client_ptr_info.is_valid()); |
+ other.provider_id = kInvalidServiceWorkerProviderId; |
+ other.route_id = MSG_ROUTING_NONE; |
+ other.type = SERVICE_WORKER_PROVIDER_UNKNOWN; |
+ other.is_parent_frame_secure = false; |
+} |
ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( |
int provider_id, |