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

Unified Diff: content/child/service_worker/service_worker_registration_handle_reference.cc

Issue 486083002: ServiceWorker: Introduce ServiceWorkerRegistrationObjectInfo for cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/child/service_worker/service_worker_registration_handle_reference.cc
diff --git a/content/child/service_worker/service_worker_registration_handle_reference.cc b/content/child/service_worker/service_worker_registration_handle_reference.cc
index 3b72a35c998385915c9d8941604a6126b97be8d7..dfbbe2144b6e6a928a75290e5ef2c7b6c08c5eab 100644
--- a/content/child/service_worker/service_worker_registration_handle_reference.cc
+++ b/content/child/service_worker/service_worker_registration_handle_reference.cc
@@ -6,49 +6,44 @@
#include "content/child/thread_safe_sender.h"
#include "content/common/service_worker/service_worker_messages.h"
-#include "content/common/service_worker/service_worker_types.h"
namespace content {
scoped_ptr<ServiceWorkerRegistrationHandleReference>
ServiceWorkerRegistrationHandleReference::Create(
- int registration_handle_id,
- const ServiceWorkerObjectInfo& info,
+ const ServiceWorkerRegistrationObjectInfo& info,
ThreadSafeSender* sender) {
return make_scoped_ptr(new ServiceWorkerRegistrationHandleReference(
- registration_handle_id, info, sender, true));
+ info, sender, true));
}
scoped_ptr<ServiceWorkerRegistrationHandleReference>
ServiceWorkerRegistrationHandleReference::Adopt(
- int registration_handle_id,
- const ServiceWorkerObjectInfo& info,
+ const ServiceWorkerRegistrationObjectInfo& info,
ThreadSafeSender* sender) {
return make_scoped_ptr(new ServiceWorkerRegistrationHandleReference(
- registration_handle_id, info, sender, false));
+ info, sender, false));
}
ServiceWorkerRegistrationHandleReference::
ServiceWorkerRegistrationHandleReference(
- int registration_handle_id,
- const ServiceWorkerObjectInfo& info,
+ const ServiceWorkerRegistrationObjectInfo& info,
ThreadSafeSender* sender,
bool increment_ref_in_ctor)
- : handle_id_(registration_handle_id),
- scope_(info.scope),
+ : info_(info),
sender_(sender) {
- DCHECK_NE(kInvalidServiceWorkerRegistrationHandleId, handle_id_);
+ DCHECK_NE(kInvalidServiceWorkerRegistrationHandleId, info_.handle_id);
DCHECK(sender_);
if (increment_ref_in_ctor)
return;
sender_->Send(
- new ServiceWorkerHostMsg_IncrementRegistrationRefCount(handle_id_));
+ new ServiceWorkerHostMsg_IncrementRegistrationRefCount(info_.handle_id));
}
ServiceWorkerRegistrationHandleReference::
~ServiceWorkerRegistrationHandleReference() {
sender_->Send(
- new ServiceWorkerHostMsg_DecrementRegistrationRefCount(handle_id_));
+ new ServiceWorkerHostMsg_DecrementRegistrationRefCount(info_.handle_id));
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698