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

Side by Side Diff: mojo/system/channel_endpoint.h

Issue 541243003: More fixes for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « content/renderer/pepper/ppb_var_deprecated_impl.cc ('k') | mojo/system/channel_endpoint.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_SYSTEM_CHANNEL_ENDPOINT_H_ 5 #ifndef MOJO_SYSTEM_CHANNEL_ENDPOINT_H_
6 #define MOJO_SYSTEM_CHANNEL_ENDPOINT_H_ 6 #define MOJO_SYSTEM_CHANNEL_ENDPOINT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "mojo/system/message_pipe.h" 10 #include "mojo/system/message_pipe.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // running since under the current scheme it wouldn't have a remote ID 96 // running since under the current scheme it wouldn't have a remote ID
97 // yet.] 97 // yet.]
98 // - Note that even if the local side is closed, it may still receive a 98 // - Note that even if the local side is closed, it may still receive a
99 // "remove" message from the other side (if the other side is closed 99 // "remove" message from the other side (if the other side is closed
100 // simultaneously, and both sides send "remove" messages). In that 100 // simultaneously, and both sides send "remove" messages). In that
101 // case, it must still remain alive until it receives the "remove 101 // case, it must still remain alive until it receives the "remove
102 // ack" (and it must ack the "remove" message that it received). 102 // ack" (and it must ack the "remove" message that it received).
103 class MOJO_SYSTEM_IMPL_EXPORT ChannelEndpoint 103 class MOJO_SYSTEM_IMPL_EXPORT ChannelEndpoint
104 : public base::RefCountedThreadSafe<ChannelEndpoint> { 104 : public base::RefCountedThreadSafe<ChannelEndpoint> {
105 public: 105 public:
106 ChannelEndpoint(MessagePipe* message_pipe, unsigned port); 106 ChannelEndpoint(const scoped_refptr<MessagePipe>& message_pipe,
vtl 2014/09/05 05:41:51 Why? The original form is fine, and avoids the ext
dcheng 2014/09/05 06:01:26 It's documentation. There's already been some disc
107 unsigned port);
107 108
108 private: 109 private:
109 enum State { 110 enum State {
110 // Attached, possibly running or not. 111 // Attached, possibly running or not.
111 STATE_NORMAL, 112 STATE_NORMAL,
112 // "Zombie" states: 113 // "Zombie" states:
113 // Waiting for |DetachMessagePipeEndpoint()| before removing. 114 // Waiting for |DetachMessagePipeEndpoint()| before removing.
114 STATE_WAIT_LOCAL_DETACH, 115 STATE_WAIT_LOCAL_DETACH,
115 // Waiting for a |kSubtypeChannelRemoveMessagePipeEndpointAck| before 116 // Waiting for a |kSubtypeChannelRemoveMessagePipeEndpointAck| before
116 // removing. 117 // removing.
(...skipping 11 matching lines...) Expand all
128 scoped_refptr<MessagePipe> message_pipe_; 129 scoped_refptr<MessagePipe> message_pipe_;
129 unsigned port_; 130 unsigned port_;
130 131
131 DISALLOW_COPY_AND_ASSIGN(ChannelEndpoint); 132 DISALLOW_COPY_AND_ASSIGN(ChannelEndpoint);
132 }; 133 };
133 134
134 } // namespace system 135 } // namespace system
135 } // namespace mojo 136 } // namespace mojo
136 137
137 #endif // MOJO_SYSTEM_CHANNEL_ENDPOINT_H_ 138 #endif // MOJO_SYSTEM_CHANNEL_ENDPOINT_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_var_deprecated_impl.cc ('k') | mojo/system/channel_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698