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

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

Issue 1396783004: Convert mojo::system::ChannelEndpointClient to use our new refcounting stuff (instead of base's). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/endpoint_relayer_unittest.cc ('k') | mojo/edk/system/incoming_endpoint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/incoming_endpoint.h
diff --git a/mojo/edk/system/incoming_endpoint.h b/mojo/edk/system/incoming_endpoint.h
index 626187e56dd65783b033c988bf8387641ad7a556..6dbf9a0270dc060e4be039d9be942b615eb08ce8 100644
--- a/mojo/edk/system/incoming_endpoint.h
+++ b/mojo/edk/system/incoming_endpoint.h
@@ -27,16 +27,16 @@ class MessagePipe;
// |MessagePipe|s or |DataPipe|s.
class IncomingEndpoint final : public ChannelEndpointClient {
public:
- IncomingEndpoint();
+ // Note: Use |MakeRefCounted<IncomingEndpoint>()|.
// Must be called before any other method.
RefPtr<ChannelEndpoint> Init() MOJO_NOT_THREAD_SAFE;
- scoped_refptr<MessagePipe> ConvertToMessagePipe();
- scoped_refptr<DataPipe> ConvertToDataPipeProducer(
+ RefPtr<MessagePipe> ConvertToMessagePipe();
+ RefPtr<DataPipe> ConvertToDataPipeProducer(
const MojoCreateDataPipeOptions& validated_options,
size_t consumer_num_bytes);
- scoped_refptr<DataPipe> ConvertToDataPipeConsumer(
+ RefPtr<DataPipe> ConvertToDataPipeConsumer(
const MojoCreateDataPipeOptions& validated_options);
// Must be called before destroying this object if |ConvertToMessagePipe()|
@@ -48,6 +48,9 @@ class IncomingEndpoint final : public ChannelEndpointClient {
void OnDetachFromChannel(unsigned port) override;
private:
+ FRIEND_MAKE_REF_COUNTED(IncomingEndpoint);
+
+ IncomingEndpoint();
~IncomingEndpoint() override;
Mutex mutex_;
« no previous file with comments | « mojo/edk/system/endpoint_relayer_unittest.cc ('k') | mojo/edk/system/incoming_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698