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

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

Issue 988063004: Use UUID for ServiceWorker Client identifier (2/3, chromium) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 5 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_version.h
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index 4d327701ae5524bb74d48b12facdf75969eb16a7..0268cede11beaffa36a99f316a8cb41672b2c907 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -313,8 +313,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
friend class ServiceWorkerVersionBrowserTest;
typedef ServiceWorkerVersion self;
- typedef std::map<ServiceWorkerProviderHost*, int> ControlleeMap;
- typedef IDMap<ServiceWorkerProviderHost> ControlleeByIDMap;
~ServiceWorkerVersion() override;
@@ -365,7 +363,7 @@ class CONTENT_EXPORT ServiceWorkerVersion
int render_process_id,
int render_frame_id);
void OnOpenWindowFinished(int request_id,
- int client_id,
+ const std::string& client_uuid,
const ServiceWorkerClientInfo& client_info);
void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data);
@@ -373,17 +371,17 @@ class CONTENT_EXPORT ServiceWorkerVersion
void OnClearCachedMetadata(const GURL& url);
void OnClearCachedMetadataFinished(int64 callback_id, int result);
- void OnPostMessageToDocument(
- int client_id,
+ void OnPostMessageToClient(
+ const std::string& client_uuid,
const base::string16& message,
const std::vector<TransferredMessagePort>& sent_message_ports);
- void OnFocusClient(int request_id, int client_id);
+ void OnFocusClient(int request_id, const std::string& client_uuid);
void OnSkipWaiting(int request_id);
void OnClaimClients(int request_id);
void OnPongFromWorker();
void OnFocusClientFinished(int request_id,
- int client_id,
+ const std::string& client_uuid,
const ServiceWorkerClientInfo& client);
void DidSkipWaiting(int request_id);
@@ -448,8 +446,7 @@ class CONTENT_EXPORT ServiceWorkerVersion
std::set<const ServiceWorkerURLRequestJob*> streaming_url_request_jobs_;
- ControlleeMap controllee_map_;
- ControlleeByIDMap controllee_by_id_;
+ std::map<std::string, ServiceWorkerProviderHost*> controllee_map_;
// Will be null while shutting down.
base::WeakPtr<ServiceWorkerContextCore> context_;
ObserverList<Listener> listeners_;

Powered by Google App Engine
This is Rietveld 408576698