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

Side by Side Diff: mojo/edk/system/proxy_message_pipe_endpoint.h

Issue 1353683005: EDK: Convert remaining scoped_ptr -> std::unique_ptr in //mojo/edk/system. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 | « mojo/edk/system/message_pipe_endpoint.h ('k') | mojo/edk/system/proxy_message_pipe_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ 5 #ifndef MOJO_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_
6 #define MOJO_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ 6 #define MOJO_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "mojo/edk/system/message_in_transit.h" 9 #include "mojo/edk/system/message_in_transit.h"
10 #include "mojo/edk/system/message_pipe_endpoint.h" 10 #include "mojo/edk/system/message_pipe_endpoint.h"
(...skipping 26 matching lines...) Expand all
37 // may be called at most once, after which |Close()| need not be called. 37 // may be called at most once, after which |Close()| need not be called.
38 // 38 //
39 // Note: The returned |ChannelEndpoint| must have its client changed while 39 // Note: The returned |ChannelEndpoint| must have its client changed while
40 // still under |MessagePipe|'s lock (which this must have also been called 40 // still under |MessagePipe|'s lock (which this must have also been called
41 // under). 41 // under).
42 scoped_refptr<ChannelEndpoint> ReleaseChannelEndpoint(); 42 scoped_refptr<ChannelEndpoint> ReleaseChannelEndpoint();
43 43
44 // |MessagePipeEndpoint| implementation: 44 // |MessagePipeEndpoint| implementation:
45 Type GetType() const override; 45 Type GetType() const override;
46 bool OnPeerClose() override; 46 bool OnPeerClose() override;
47 void EnqueueMessage(scoped_ptr<MessageInTransit> message) override; 47 void EnqueueMessage(std::unique_ptr<MessageInTransit> message) override;
48 void Close() override; 48 void Close() override;
49 49
50 private: 50 private:
51 void DetachIfNecessary(); 51 void DetachIfNecessary();
52 52
53 scoped_refptr<ChannelEndpoint> channel_endpoint_; 53 scoped_refptr<ChannelEndpoint> channel_endpoint_;
54 54
55 MOJO_DISALLOW_COPY_AND_ASSIGN(ProxyMessagePipeEndpoint); 55 MOJO_DISALLOW_COPY_AND_ASSIGN(ProxyMessagePipeEndpoint);
56 }; 56 };
57 57
58 } // namespace system 58 } // namespace system
59 } // namespace mojo 59 } // namespace mojo
60 60
61 #endif // MOJO_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ 61 #endif // MOJO_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/message_pipe_endpoint.h ('k') | mojo/edk/system/proxy_message_pipe_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698