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

Unified Diff: mojo/edk/system/message_pipe_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
« no previous file with comments | « mojo/edk/system/message_in_transit.cc ('k') | mojo/edk/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe_dispatcher.h
diff --git a/mojo/edk/system/message_pipe_dispatcher.h b/mojo/edk/system/message_pipe_dispatcher.h
index bfc7997a42ea382ac23a5637b77db185c0a21676..24b262f1dd2b63824069c39e0f2cd0c6536d6672 100644
--- a/mojo/edk/system/message_pipe_dispatcher.h
+++ b/mojo/edk/system/message_pipe_dispatcher.h
@@ -5,7 +5,6 @@
#ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_
#define MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_
-#include "base/memory/ref_counted.h"
#include "mojo/edk/system/dispatcher.h"
#include "mojo/edk/system/memory.h"
#include "mojo/edk/system/ref_ptr.h"
@@ -27,9 +26,9 @@ class MessagePipeDispatcher final : public Dispatcher {
// this is exposed directly for testing convenience.)
static const MojoCreateMessagePipeOptions kDefaultCreateOptions;
- static scoped_refptr<MessagePipeDispatcher> Create(
+ static RefPtr<MessagePipeDispatcher> Create(
const MojoCreateMessagePipeOptions& /*validated_options*/) {
- return make_scoped_refptr(new MessagePipeDispatcher());
+ return AdoptRef(new MessagePipeDispatcher());
}
// Validates and/or sets default options for |MojoCreateMessagePipeOptions|.
@@ -53,14 +52,14 @@ class MessagePipeDispatcher final : public Dispatcher {
// the message pipe, port 0).
// TODO(vtl): This currently uses |kDefaultCreateOptions|, which is okay since
// there aren't any options, but eventually options should be plumbed through.
- static scoped_refptr<MessagePipeDispatcher> CreateRemoteMessagePipe(
+ static RefPtr<MessagePipeDispatcher> CreateRemoteMessagePipe(
RefPtr<ChannelEndpoint>* channel_endpoint);
// The "opposite" of |SerializeAndClose()|. (Typically this is called by
// |Dispatcher::Deserialize()|.)
- static scoped_refptr<MessagePipeDispatcher> Deserialize(Channel* channel,
- const void* source,
- size_t size);
+ static RefPtr<MessagePipeDispatcher> Deserialize(Channel* channel,
+ const void* source,
+ size_t size);
private:
friend class MessagePipeDispatcherTransport;
@@ -79,8 +78,7 @@ class MessagePipeDispatcher final : public Dispatcher {
// |Dispatcher| protected methods:
void CancelAllAwakablesNoLock() override;
void CloseImplNoLock() override;
- scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
- override;
+ RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() override;
MojoResult WriteMessageImplNoLock(
UserPointer<const void> bytes,
uint32_t num_bytes,
« no previous file with comments | « mojo/edk/system/message_in_transit.cc ('k') | mojo/edk/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698