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

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

Issue 463013002: ServiceWorker: Implement updatefound event and version attributes (Chromium) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add browser-side implementation and wiring part Created 6 years, 4 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_core.cc
diff --git a/content/browser/service_worker/service_worker_context_core.cc b/content/browser/service_worker/service_worker_context_core.cc
index 582a4c585a638ac460cab788acd6f4f046acd0cb..f1d80ab8e6569b10079e0039c04a82033937332b 100644
--- a/content/browser/service_worker/service_worker_context_core.cc
+++ b/content/browser/service_worker/service_worker_context_core.cc
@@ -102,6 +102,7 @@ ServiceWorkerContextCore::ServiceWorkerContextCore(
embedded_worker_registry_(EmbeddedWorkerRegistry::Create(AsWeakPtr())),
job_coordinator_(new ServiceWorkerJobCoordinator(AsWeakPtr())),
next_handle_id_(0),
+ next_registration_handle_id_(0),
observer_list_(observer_list) {
}
@@ -120,6 +121,7 @@ ServiceWorkerContextCore::ServiceWorkerContextCore(
old_context->embedded_worker_registry())),
job_coordinator_(new ServiceWorkerJobCoordinator(AsWeakPtr())),
next_handle_id_(0),
+ next_registration_handle_id_(0),
observer_list_(old_context->observer_list_) {
}
@@ -317,6 +319,10 @@ int ServiceWorkerContextCore::GetNewServiceWorkerHandleId() {
return next_handle_id_++;
}
+int ServiceWorkerContextCore::GetNewRegistrationHandleId() {
+ return next_registration_handle_id_++;
+}
+
void ServiceWorkerContextCore::ScheduleDeleteAndStartOver() const {
storage_->Disable();
base::MessageLoop::current()->PostTask(

Powered by Google App Engine
This is Rietveld 408576698