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

Unified Diff: content/browser/service_worker/service_worker_provider_host.cc

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_provider_host.cc
diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc
index da614200afed55b3a69cc40b022f9e903a3d6509..b210012fa022bb5fe5bc132d3ab842a589f3935a 100644
--- a/content/browser/service_worker/service_worker_provider_host.cc
+++ b/content/browser/service_worker/service_worker_provider_host.cc
@@ -4,6 +4,7 @@
#include "content/browser/service_worker/service_worker_provider_host.h"
+#include "base/guid.h"
#include "base/stl_util.h"
#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/frame_tree_node.h"
@@ -65,7 +66,8 @@ ServiceWorkerProviderHost::ServiceWorkerProviderHost(
ServiceWorkerProviderType provider_type,
base::WeakPtr<ServiceWorkerContextCore> context,
ServiceWorkerDispatcherHost* dispatcher_host)
- : render_process_id_(render_process_id),
+ : client_uuid_(base::GenerateGUID()),
+ render_process_id_(render_process_id),
render_frame_id_(render_frame_id),
render_thread_id_(kDocumentMainThreadId),
provider_id_(provider_id),
@@ -80,6 +82,7 @@ ServiceWorkerProviderHost::ServiceWorkerProviderHost(
// Actual thread id is set when the service worker context gets started.
render_thread_id_ = kInvalidEmbeddedWorkerThreadId;
}
+ context_->RegisterClientIDForProviderHost(client_uuid_, this);
}
ServiceWorkerProviderHost::~ServiceWorkerProviderHost() {
« no previous file with comments | « content/browser/service_worker/service_worker_provider_host.h ('k') | content/browser/service_worker/service_worker_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698