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

Unified Diff: content/child/service_worker/web_service_worker_impl.h

Issue 224733014: Introduce ServiceWorkerHandle for tracking WebServiceWorkerImpl reference (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/web_service_worker_impl.h
diff --git a/content/child/service_worker/web_service_worker_impl.h b/content/child/service_worker/web_service_worker_impl.h
index a6e0026c9cd3f7d3cef4f52589ea35c0eee0b7e7..bd66822a800c0922d11c5689eadb1624455a8b3c 100644
--- a/content/child/service_worker/web_service_worker_impl.h
+++ b/content/child/service_worker/web_service_worker_impl.h
@@ -6,6 +6,7 @@
#define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
#include "third_party/WebKit/public/platform/WebServiceWorker.h"
@@ -17,21 +18,18 @@ class ThreadSafeSender;
class WebServiceWorkerImpl
: NON_EXPORTED_BASE(public blink::WebServiceWorker) {
public:
- WebServiceWorkerImpl(int64 registration_id,
+ WebServiceWorkerImpl(int handle_id,
int64 version_id,
- ThreadSafeSender* thread_safe_sender)
- : registration_id_(registration_id),
- version_id_(version_id),
- thread_safe_sender_(thread_safe_sender) {}
+ ThreadSafeSender* thread_safe_sender);
virtual ~WebServiceWorkerImpl();
virtual void postMessage(const blink::WebString& message,
blink::WebMessagePortChannelArray* channels);
private:
- int64 registration_id_;
- int64 version_id_;
- ThreadSafeSender* thread_safe_sender_;
+ const int handle_id_;
+ const int64 version_id_;
+ scoped_refptr<ThreadSafeSender> thread_safe_sender_;
michaeln 2014/04/08 01:21:41 thnx for fixing
DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698