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

Unified Diff: mojo/edk/system/channel.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 | « no previous file | mojo/edk/system/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel.h
diff --git a/mojo/edk/system/channel.h b/mojo/edk/system/channel.h
index f04b2d4cc5fa42dbcbc7ce6b054d4b6281679e85..3857a14f06dd75e71b6fdd3d9644204c57378f1a 100644
--- a/mojo/edk/system/channel.h
+++ b/mojo/edk/system/channel.h
@@ -10,7 +10,6 @@
#include <memory>
#include <unordered_map>
-#include "base/memory/ref_counted.h"
#include "base/threading/thread_checker.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
#include "mojo/edk/system/channel_endpoint.h"
@@ -153,7 +152,7 @@ class Channel final : public RefCountedThreadSafe<Channel>,
RefPtr<ChannelEndpoint> SerializeEndpointWithLocalPeer(
void* destination,
MessageInTransitQueue* message_queue,
- ChannelEndpointClient* endpoint_client,
+ RefPtr<ChannelEndpointClient>&& endpoint_client,
unsigned endpoint_client_port);
void SerializeEndpointWithRemotePeer(void* destination,
MessageInTransitQueue* message_queue,
@@ -165,7 +164,7 @@ class Channel final : public RefCountedThreadSafe<Channel>,
// |GetSerializedEndpointSize()| bytes. This returns the deserialized
// |IncomingEndpoint| (which can be converted into a |MessagePipe|) or null on
// error.
- scoped_refptr<IncomingEndpoint> DeserializeEndpoint(const void* source);
+ RefPtr<IncomingEndpoint> DeserializeEndpoint(const void* source);
// See |RawChannel::GetSerializedPlatformHandleSize()|.
size_t GetSerializedPlatformHandleSize() const;
@@ -266,7 +265,7 @@ class Channel final : public RefCountedThreadSafe<Channel>,
LocalChannelEndpointIdGenerator local_id_generator_ MOJO_GUARDED_BY(mutex_);
using IdToIncomingEndpointMap =
- std::unordered_map<ChannelEndpointId, scoped_refptr<IncomingEndpoint>>;
+ std::unordered_map<ChannelEndpointId, RefPtr<IncomingEndpoint>>;
// Map from local IDs to incoming endpoints (i.e., those received inside other
// messages, but not yet claimed via |DeserializeEndpoint()|).
IdToIncomingEndpointMap incoming_endpoints_ MOJO_GUARDED_BY(mutex_);
« no previous file with comments | « no previous file | mojo/edk/system/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698