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

Unified Diff: mojo/edk/system/platform_handle_dispatcher.h

Issue 1412283002: Convert mojo::system::Dispatcher to use our new refcounting stuff (instead of base's). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: no change Created 5 years, 2 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: mojo/edk/system/platform_handle_dispatcher.h
diff --git a/mojo/edk/system/platform_handle_dispatcher.h b/mojo/edk/system/platform_handle_dispatcher.h
index 86d63e598893999002479f8bac2ba7b99ab770fd..db2f0cfa5434081b3aad6bd5292a3b4549745e17 100644
--- a/mojo/edk/system/platform_handle_dispatcher.h
+++ b/mojo/edk/system/platform_handle_dispatcher.h
@@ -6,6 +6,7 @@
#define MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
#include "mojo/edk/embedder/scoped_platform_handle.h"
+#include "mojo/edk/system/ref_ptr.h"
#include "mojo/edk/system/simple_dispatcher.h"
#include "mojo/public/cpp/system/macros.h"
@@ -16,10 +17,9 @@ namespace system {
// the embedder).
class PlatformHandleDispatcher final : public SimpleDispatcher {
public:
- static scoped_refptr<PlatformHandleDispatcher> Create(
+ static RefPtr<PlatformHandleDispatcher> Create(
embedder::ScopedPlatformHandle platform_handle) {
- return make_scoped_refptr(
- new PlatformHandleDispatcher(platform_handle.Pass()));
+ return AdoptRef(new PlatformHandleDispatcher(platform_handle.Pass()));
}
embedder::ScopedPlatformHandle PassPlatformHandle();
@@ -29,7 +29,7 @@ class PlatformHandleDispatcher final : public SimpleDispatcher {
// The "opposite" of |SerializeAndClose()|. (Typically this is called by
// |Dispatcher::Deserialize()|.)
- static scoped_refptr<PlatformHandleDispatcher> Deserialize(
+ static RefPtr<PlatformHandleDispatcher> Deserialize(
Channel* channel,
const void* source,
size_t size,
@@ -42,8 +42,7 @@ class PlatformHandleDispatcher final : public SimpleDispatcher {
// |Dispatcher| protected methods:
void CloseImplNoLock() override;
- scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
- override;
+ RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() override;
void StartSerializeImplNoLock(Channel* channel,
size_t* max_size,
size_t* max_platform_handles) override
« no previous file with comments | « mojo/edk/system/multiprocess_message_pipe_unittest.cc ('k') | mojo/edk/system/platform_handle_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698