Index: content/browser/service_worker/service_worker_test_utils.cc |
diff --git a/content/browser/service_worker/service_worker_test_utils.cc b/content/browser/service_worker/service_worker_test_utils.cc |
index 7d9941668b8b87cac9b01efc57879949a8bef346..4c8f7390b91924cba6bc779d126ad9be89b5cfe6 100644 |
--- a/content/browser/service_worker/service_worker_test_utils.cc |
+++ b/content/browser/service_worker/service_worker_test_utils.cc |
@@ -7,8 +7,6 @@ |
#include <utility> |
#include "content/browser/service_worker/service_worker_provider_host.h" |
-#include "content/common/service_worker/service_worker_provider.mojom.h" |
-#include "content/public/common/child_process_host.h" |
namespace content { |
@@ -28,12 +26,6 @@ void ServiceWorkerRemoteProviderEndpoint::BindWithProviderHostInfo( |
info->host_request = mojo::MakeIsolatedRequest(&host_ptr_); |
} |
-void ServiceWorkerRemoteProviderEndpoint::BindWithProviderInfo( |
- mojom::ServiceWorkerProviderInfoForStartWorkerPtr info) { |
- client_request_ = std::move(info->client_request); |
- host_ptr_.Bind(std::move(info->host_ptr_info)); |
-} |
- |
std::unique_ptr<ServiceWorkerProviderHost> CreateProviderHostForWindow( |
int process_id, |
int provider_id, |
@@ -51,19 +43,16 @@ std::unique_ptr<ServiceWorkerProviderHost> CreateProviderHostForWindow( |
std::unique_ptr<ServiceWorkerProviderHost> |
CreateProviderHostForServiceWorkerContext( |
int process_id, |
+ int provider_id, |
bool is_parent_frame_secure, |
- ServiceWorkerVersion* hosted_version, |
base::WeakPtr<ServiceWorkerContextCore> context, |
ServiceWorkerRemoteProviderEndpoint* output_endpoint) { |
- ServiceWorkerProviderHostInfo info( |
- kInvalidServiceWorkerProviderId, MSG_ROUTING_NONE, |
- SERVICE_WORKER_PROVIDER_FOR_CONTROLLER, is_parent_frame_secure); |
- std::unique_ptr<ServiceWorkerProviderHost> host = |
- ServiceWorkerProviderHost::PreCreateForController(std::move(context)); |
- mojom::ServiceWorkerProviderInfoForStartWorkerPtr provider_info = |
- host->CompleteStartWorkerPreparation(process_id, hosted_version); |
- output_endpoint->BindWithProviderInfo(std::move(provider_info)); |
- return host; |
+ ServiceWorkerProviderHostInfo info(provider_id, MSG_ROUTING_NONE, |
+ SERVICE_WORKER_PROVIDER_FOR_CONTROLLER, |
+ is_parent_frame_secure); |
+ output_endpoint->BindWithProviderHostInfo(&info); |
+ return ServiceWorkerProviderHost::Create(process_id, std::move(info), |
+ std::move(context), nullptr); |
} |
std::unique_ptr<ServiceWorkerProviderHost> CreateProviderHostWithDispatcherHost( |