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

Unified Diff: content/common/service_worker/service_worker_provider_host_info.cc

Issue 2653493009: Add two interfaces for ServiceWorkerProviderContext/ProviderHost (Closed)
Patch Set: Rebased/Fixed unittests when BrowserSideNavigation is enabled Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698