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

Unified Diff: mojo/edk/system/data_pipe_producer_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/data_pipe_impl_unittest.cc ('k') | mojo/edk/system/data_pipe_producer_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/data_pipe_producer_dispatcher.h
diff --git a/mojo/edk/system/data_pipe_producer_dispatcher.h b/mojo/edk/system/data_pipe_producer_dispatcher.h
index aed201f80721a8bc6af0edaec43c5f95fa695b2f..77c09aac88c45d0a9264a275bad0a5a8c625a61d 100644
--- a/mojo/edk/system/data_pipe_producer_dispatcher.h
+++ b/mojo/edk/system/data_pipe_producer_dispatcher.h
@@ -5,7 +5,6 @@
#ifndef MOJO_EDK_SYSTEM_DATA_PIPE_PRODUCER_DISPATCHER_H_
#define MOJO_EDK_SYSTEM_DATA_PIPE_PRODUCER_DISPATCHER_H_
-#include "base/memory/ref_counted.h"
#include "mojo/edk/system/dispatcher.h"
#include "mojo/edk/system/ref_ptr.h"
#include "mojo/public/cpp/system/macros.h"
@@ -20,8 +19,8 @@ class DataPipe;
// thread-safe.
class DataPipeProducerDispatcher final : public Dispatcher {
public:
- static scoped_refptr<DataPipeProducerDispatcher> Create() {
- return make_scoped_refptr(new DataPipeProducerDispatcher());
+ static RefPtr<DataPipeProducerDispatcher> Create() {
+ return AdoptRef(new DataPipeProducerDispatcher());
}
// Must be called before any other methods.
@@ -32,8 +31,9 @@ class DataPipeProducerDispatcher final : public Dispatcher {
// The "opposite" of |SerializeAndClose()|. (Typically this is called by
// |Dispatcher::Deserialize()|.)
- static scoped_refptr<DataPipeProducerDispatcher>
- Deserialize(Channel* channel, const void* source, size_t size);
+ static RefPtr<DataPipeProducerDispatcher> Deserialize(Channel* channel,
+ const void* source,
+ size_t size);
// Get access to the |DataPipe| for testing.
DataPipe* GetDataPipeForTest();
@@ -45,8 +45,7 @@ class DataPipeProducerDispatcher final : public Dispatcher {
// |Dispatcher| protected methods:
void CancelAllAwakablesNoLock() override;
void CloseImplNoLock() override;
- scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
- override;
+ RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() override;
MojoResult WriteDataImplNoLock(UserPointer<const void> elements,
UserPointer<uint32_t> num_bytes,
MojoWriteDataFlags flags) override;
« no previous file with comments | « mojo/edk/system/data_pipe_impl_unittest.cc ('k') | mojo/edk/system/data_pipe_producer_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698