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

Unified Diff: content/browser/service_worker/embedded_worker_test_helper.h

Issue 2779763004: Create ServiceWorkerProviderHost before starting worker (Closed)
Patch Set: Pass the param of BindWithProviderInfo by value instead of pointer Created 3 years, 6 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/browser/service_worker/embedded_worker_test_helper.h
diff --git a/content/browser/service_worker/embedded_worker_test_helper.h b/content/browser/service_worker/embedded_worker_test_helper.h
index b94ffebb7bace031b23f346e9cf5a7610e86630c..3038c9e6096603dcb9c3ac311fd995feb0339fc6 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.h
+++ b/content/browser/service_worker/embedded_worker_test_helper.h
@@ -83,7 +83,8 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
void StartWorker(
const EmbeddedWorkerStartParams& params,
mojom::ServiceWorkerEventDispatcherRequest dispatcher_request,
- mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo instance_host)
+ mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo instance_host,
+ mojom::ServiceWorkerProviderInfoForStartWorkerPtr provider_info)
override;
void StopWorker() override;
void ResumeAfterDownload() override;
@@ -114,7 +115,7 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
// IPC::Listener implementation.
bool OnMessageReceived(const IPC::Message& msg) override;
- // Register a mojo endpoint object derived from
+ // Registers a Mojo endpoint object derived from
// MockEmbeddedWorkerInstanceClient.
void RegisterMockInstanceClient(
std::unique_ptr<MockEmbeddedWorkerInstanceClient> client);
@@ -147,7 +148,6 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
void ShutdownContext();
int GetNextThreadId() { return next_thread_id_++; }
- int GetNextProviderId() { return next_provider_id_++; }
int mock_render_process_id() const { return mock_render_process_id_; }
MockRenderProcessHost* mock_render_process_host() {
@@ -180,7 +180,8 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
const GURL& script_url,
bool pause_after_download,
mojom::ServiceWorkerEventDispatcherRequest request,
- mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo instance_host);
+ mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo instance_host,
+ mojom::ServiceWorkerProviderInfoForStartWorkerPtr provider_info);
virtual void OnResumeAfterDownload(int embedded_worker_id);
// StopWorker IPC handler routed through MockEmbeddedWorkerInstanceClient.
// This calls SimulateWorkerStopped() by default.
@@ -251,9 +252,7 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
void SimulateWorkerReadyForInspection(int embedded_worker_id);
void SimulateWorkerScriptCached(int embedded_worker_id);
void SimulateWorkerScriptLoaded(int embedded_worker_id);
- void SimulateWorkerThreadStarted(int thread_id,
- int embedded_worker_id,
- int provider_id);
+ void SimulateWorkerThreadStarted(int thread_id, int embedded_worker_id);
void SimulateWorkerScriptEvaluated(int embedded_worker_id, bool success);
void SimulateWorkerStarted(int embedded_worker_id);
void SimulateWorkerStopped(int embedded_worker_id);
@@ -267,7 +266,8 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
void OnStartWorkerStub(
const EmbeddedWorkerStartParams& params,
mojom::ServiceWorkerEventDispatcherRequest request,
- mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo instance_host);
+ mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo instance_host,
+ mojom::ServiceWorkerProviderInfoForStartWorkerPtr provider_info);
void OnResumeAfterDownloadStub(int embedded_worker_id);
void OnStopWorkerStub(int embedded_worker_id);
void OnMessageToWorkerStub(int thread_id,
@@ -344,7 +344,6 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
size_t mock_instance_clients_next_index_;
int next_thread_id_;
- int next_provider_id_;
int mock_render_process_id_;
int new_mock_render_process_id_;

Powered by Google App Engine
This is Rietveld 408576698