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

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

Issue 2399933003: Revert of Mojoify FetchEvent of Service Worker. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | content/browser/service_worker/embedded_worker_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eb2ea20844f557782deee41597054ce5c1c74735..97ec16377256d795e09c3ebb7c891891ae6b1605 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.h
+++ b/content/browser/service_worker/embedded_worker_test_helper.h
@@ -16,9 +16,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/optional.h"
-#include "base/time/time.h"
#include "content/common/service_worker/embedded_worker.mojom.h"
-#include "content/common/service_worker/service_worker_status_code.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_test_sink.h"
#include "mojo/public/cpp/bindings/binding.h"
@@ -65,10 +63,6 @@
class EmbeddedWorkerTestHelper : public IPC::Sender,
public IPC::Listener {
public:
- using FetchCallback =
- base::Callback<void(ServiceWorkerStatusCode,
- base::Time /* dispatch_event_time */)>;
-
class MockEmbeddedWorkerInstanceClient
: public mojom::EmbeddedWorkerInstanceClient {
public:
@@ -156,8 +150,7 @@
// Called to setup mojo for a new embedded worker. Override to register
// interfaces the worker should expose to the browser.
- virtual void OnSetupMojo(int thread_id,
- shell::InterfaceRegistry* interface_registry);
+ virtual void OnSetupMojo(shell::InterfaceRegistry* interface_registry);
// On*Event handlers. Called by the default implementation of
// OnMessageToWorker when events are sent to the embedded
@@ -168,8 +161,8 @@
virtual void OnInstallEvent(int embedded_worker_id, int request_id);
virtual void OnFetchEvent(int embedded_worker_id,
int response_id,
- const ServiceWorkerFetchRequest& request,
- const FetchCallback& callback);
+ int event_finish_id,
+ const ServiceWorkerFetchRequest& request);
virtual void OnPushEvent(int embedded_worker_id,
int request_id,
const PushEventPayload& payload);
@@ -193,7 +186,6 @@
std::unique_ptr<shell::InterfaceProvider>>;
class MockEmbeddedWorkerSetup;
- class MockFetchEventDispatcher;
void OnStartWorkerStub(const EmbeddedWorkerStartParams& params);
void OnResumeAfterDownloadStub(int embedded_worker_id);
@@ -206,10 +198,9 @@
int request_id,
const ServiceWorkerMsg_ExtendableMessageEvent_Params& params);
void OnInstallEventStub(int request_id);
- void OnFetchEventStub(int thread_id,
- int response_id,
- const ServiceWorkerFetchRequest& request,
- const FetchCallback& callback);
+ void OnFetchEventStub(int response_id,
+ int event_finish_id,
+ const ServiceWorkerFetchRequest& request);
void OnPushEventStub(int request_id, const PushEventPayload& payload);
void OnSetupMojoStub(int thread_id,
shell::mojom::InterfaceProviderRequest services,
@@ -242,8 +233,6 @@
new_render_process_interface_registry_;
std::map<int, int64_t> embedded_worker_id_service_worker_version_id_map_;
- std::map<int /* thread_id */, int /* embedded_worker_id */>
- thread_id_embedded_worker_id_map_;
// Stores the InterfaceRegistry/InterfaceProviders that are associated with
// each individual service worker.
« no previous file with comments | « no previous file | content/browser/service_worker/embedded_worker_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698