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

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

Issue 1079923002: ServiceWorker: Stop exposing ServiceWorkerContextCore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/service_worker_context_wrapper.h
diff --git a/content/browser/service_worker/service_worker_context_wrapper.h b/content/browser/service_worker/service_worker_context_wrapper.h
index 00488c5092e9c5325d29af30cbd81f7f789b238e..466f11f50c52faeeb5d7eff46177c1acf315f20e 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.h
+++ b/content/browser/service_worker/service_worker_context_wrapper.h
@@ -55,11 +55,6 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
// called on the IO thread.
void DeleteAndStartOver();
- // The core context is only for use on the IO thread.
- // Can be null before/during init, during/after shutdown, and after
- // DeleteAndStartOver fails.
- ServiceWorkerContextCore* context();
-
// The StoragePartition should only be used on the UI thread.
// Can be null before/during init and during/after shutdown.
StoragePartitionImpl* storage_partition() const;
@@ -88,6 +83,37 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
const GURL& other_url,
const CheckHasServiceWorkerCallback& callback) override;
+ ServiceWorkerRegistration* GetLiveRegistration(int64_t registration_id);
+ ServiceWorkerVersion* GetLiveVersion(int64_t version_id);
+ std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo();
+ std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo();
+
+ void FindRegistrationForDocument(
+ const GURL& document_url,
+ const ServiceWorkerStorage::FindRegistrationCallback& callback);
+ void FindRegistrationForId(
+ int64_t registration_id,
+ const GURL& origin,
+ const ServiceWorkerStorage::FindRegistrationCallback& callback);
+ void GetAllRegistrations(
+ const ServiceWorkerStorage::GetRegistrationsInfosCallback& callback);
+ void GetRegistrationUserData(
+ int64_t registration_id,
+ const std::string& key,
+ const ServiceWorkerStorage::GetUserDataCallback& callback);
+ void StoreRegistrationUserData(int64_t registration_id,
+ const GURL& origin,
+ const std::string& key,
+ const std::string& data,
+ const StatusCallback& callback);
+ void ClearRegistrationUserData(int64_t registration_id,
+ const std::string& key,
+ const StatusCallback& callback);
+ void GetUserDataForAllRegistrations(
+ const std::string& key,
+ const ServiceWorkerStorage::GetUserDataForAllRegistrationsCallback&
+ callback);
+
// DeleteForOrigin with completion callback. Does not exit early, and returns
// false if one or more of the deletions fail.
virtual void DeleteForOrigin(const GURL& origin_url,
@@ -103,7 +129,12 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
friend class BackgroundSyncManagerTest;
friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>;
friend class EmbeddedWorkerTestHelper;
+ friend class EmbeddedWorkerBrowserTest;
+ friend class ServiceWorkerDispatcherHost;
+ friend class ServiceWorkerInternalsUI;
friend class ServiceWorkerProcessManager;
+ friend class ServiceWorkerRequestHandler;
+ friend class ServiceWorkerVersionBrowserTest;
friend class MockServiceWorkerContextWrapper;
~ServiceWorkerContextWrapper() override;
@@ -128,6 +159,11 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
ServiceWorkerStatusCode status,
const scoped_refptr<ServiceWorkerRegistration>& registration);
+ // The core context is only for use on the IO thread.
+ // Can be null before/during init, during/after shutdown, and after
+ // DeleteAndStartOver fails.
+ ServiceWorkerContextCore* context();
+
const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> >
observer_list_;
const scoped_ptr<ServiceWorkerProcessManager> process_manager_;

Powered by Google App Engine
This is Rietveld 408576698