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

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

Issue 189253002: Implement ServiceWorker::postMessage() [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 6 years, 9 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_storage.h
diff --git a/content/browser/service_worker/service_worker_storage.h b/content/browser/service_worker/service_worker_storage.h
index 6dda5a950905b4aa8cbef1629e345da72264acfd..bc1eaffd92a45f40c6915efeea17c2c31fdfd9bd 100644
--- a/content/browser/service_worker/service_worker_storage.h
+++ b/content/browser/service_worker/service_worker_storage.h
@@ -36,7 +36,7 @@ class CONTENT_EXPORT ServiceWorkerStorage {
quota::QuotaManagerProxy* quota_manager_proxy);
~ServiceWorkerStorage();
- // Finds registration for |document_url| or |pattern|.
+ // Finds registration for |document_url| or |pattern| or |registraion_id|.
// Returns SERVICE_WORKER_OK with non-null registration if registration
// is found, or returns SERVICE_WORKER_ERROR_NOT_FOUND if no matching
// registration is found.
@@ -44,6 +44,8 @@ class CONTENT_EXPORT ServiceWorkerStorage {
const FindRegistrationCallback& callback);
void FindRegistrationForPattern(const GURL& pattern,
const FindRegistrationCallback& callback);
+ void FindRegistrationForId(int64 registration_id,
+ const FindRegistrationCallback& callback);
// Stores |registration|. Returns SERVICE_WORKER_ERROR_EXISTS if
// conflicting registration (which has different script_url) is
@@ -65,6 +67,8 @@ class CONTENT_EXPORT ServiceWorkerStorage {
typedef std::map<GURL, scoped_refptr<ServiceWorkerRegistration> >
PatternToRegistrationMap;
+ typedef std::map<int64, scoped_refptr<ServiceWorkerRegistration> >
+ RegistrationIdToRegistrationMap;
static bool PatternMatches(const GURL& pattern, const GURL& script_url);

Powered by Google App Engine
This is Rietveld 408576698