Index: content/browser/service_worker/service_worker_dispatcher_host.h |
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.h b/content/browser/service_worker/service_worker_dispatcher_host.h |
index 2d6be547fa1880d671e9f74fa4341623a9bda250..6670faa3b318c19fbee66c09f58657e1ba39cf0e 100644 |
--- a/content/browser/service_worker/service_worker_dispatcher_host.h |
+++ b/content/browser/service_worker/service_worker_dispatcher_host.h |
@@ -44,8 +44,7 @@ struct ServiceWorkerVersionAttributes; |
// This class is bound with mojom::ServiceWorkerDispatcherHost. All |
// InterfacePtrs on the same render process are bound to the same |
-// content::ServiceWorkerDispatcherHost. This can be overridden only for |
-// testing. |
+// content::ServiceWorkerDispatcherHost. |
class CONTENT_EXPORT ServiceWorkerDispatcherHost |
: public BrowserMessageFilter, |
public BrowserAssociatedInterface<mojom::ServiceWorkerDispatcherHost>, |
@@ -71,25 +70,13 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost |
// be destroyed. |
bool Send(IPC::Message* message) override; |
- // Virtual for testing. |
- virtual void RegisterServiceWorkerHandle( |
- std::unique_ptr<ServiceWorkerHandle> handle); |
- // Virtual for testing. |
- virtual void RegisterServiceWorkerRegistrationHandle( |
+ void RegisterServiceWorkerHandle(std::unique_ptr<ServiceWorkerHandle> handle); |
+ void RegisterServiceWorkerRegistrationHandle( |
std::unique_ptr<ServiceWorkerRegistrationHandle> handle); |
ServiceWorkerHandle* FindServiceWorkerHandle(int provider_id, |
int64_t version_id); |
- // Gets or creates the registration and version handles appropriate for |
- // representing |registration| inside of |provider_host|. Sets |out_info| and |
- // |out_attrs| accordingly for these handles. |
- void GetRegistrationObjectInfoAndVersionAttributes( |
- base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
- ServiceWorkerRegistration* registration, |
- ServiceWorkerRegistrationObjectInfo* out_info, |
- ServiceWorkerVersionAttributes* out_attrs); |
- |
// Returns the existing registration handle whose reference count is |
// incremented or a newly created one if it doesn't exist. |
ServiceWorkerRegistrationHandle* GetOrCreateRegistrationHandle( |
@@ -108,14 +95,15 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost |
ProviderCreatedAndDestroyed); |
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDispatcherHostTest, |
CleanupOnRendererCrash); |
- FRIEND_TEST_ALL_PREFIXES(BackgroundSyncManagerTest, |
- RegisterWithoutLiveSWRegistration); |
using StatusCallback = base::Callback<void(ServiceWorkerStatusCode status)>; |
enum class ProviderStatus { OK, NO_CONTEXT, DEAD_HOST, NO_HOST, NO_URL }; |
// mojom::ServiceWorkerDispatcherHost implementation |
void OnProviderCreated(ServiceWorkerProviderHostInfo info) override; |
+ void OnSetHostedVersionId(int provider_id, |
+ int64_t version_id, |
+ int embedded_worker_id) override; |
// IPC Message handlers |
void OnRegisterServiceWorker(int thread_id, |
@@ -204,6 +192,12 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost |
int provider_id, |
int64_t registration_handle_id); |
+ void GetRegistrationObjectInfoAndVersionAttributes( |
+ base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
+ ServiceWorkerRegistration* registration, |
+ ServiceWorkerRegistrationObjectInfo* info, |
+ ServiceWorkerVersionAttributes* attrs); |
+ |
// Callbacks from ServiceWorkerContextCore |
void RegistrationComplete(int thread_id, |
int provider_id, |