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

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

Issue 1350503004: Some easy conversions of scoped_ptr -> std::unique_ptr in the EDK. (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/raw_channel_posix.cc ('k') | mojo/edk/system/remote_message_pipe_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_REMOTE_CONSUMER_DATA_PIPE_IMPL_H_ 5 #ifndef MOJO_EDK_SYSTEM_REMOTE_CONSUMER_DATA_PIPE_IMPL_H_
6 #define MOJO_EDK_SYSTEM_REMOTE_CONSUMER_DATA_PIPE_IMPL_H_ 6 #define MOJO_EDK_SYSTEM_REMOTE_CONSUMER_DATA_PIPE_IMPL_H_
7 7
8 #include <memory>
9
8 #include "base/memory/aligned_memory.h" 10 #include "base/memory/aligned_memory.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "mojo/edk/system/channel_endpoint.h" 12 #include "mojo/edk/system/channel_endpoint.h"
12 #include "mojo/edk/system/data_pipe_impl.h" 13 #include "mojo/edk/system/data_pipe_impl.h"
13 #include "mojo/edk/system/system_impl_export.h" 14 #include "mojo/edk/system/system_impl_export.h"
14 #include "mojo/public/cpp/system/macros.h" 15 #include "mojo/public/cpp/system/macros.h"
15 16
16 namespace mojo { 17 namespace mojo {
17 namespace system { 18 namespace system {
18 19
19 // |RemoteConsumerDataPipeImpl| is a subclass that "implements" |DataPipe| for 20 // |RemoteConsumerDataPipeImpl| is a subclass that "implements" |DataPipe| for
20 // data pipes whose producer is local and whose consumer is remote. See 21 // data pipes whose producer is local and whose consumer is remote. See
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void Disconnect(); 91 void Disconnect();
91 92
92 // Should be valid if and only if |consumer_open()| returns true. 93 // Should be valid if and only if |consumer_open()| returns true.
93 scoped_refptr<ChannelEndpoint> channel_endpoint_; 94 scoped_refptr<ChannelEndpoint> channel_endpoint_;
94 95
95 // The number of bytes we've sent the consumer, but don't *know* have been 96 // The number of bytes we've sent the consumer, but don't *know* have been
96 // consumed. 97 // consumed.
97 size_t consumer_num_bytes_; 98 size_t consumer_num_bytes_;
98 99
99 // Used for two-phase writes. 100 // Used for two-phase writes.
100 scoped_ptr<char, base::AlignedFreeDeleter> buffer_; 101 std::unique_ptr<char, base::AlignedFreeDeleter> buffer_;
101 102
102 MOJO_DISALLOW_COPY_AND_ASSIGN(RemoteConsumerDataPipeImpl); 103 MOJO_DISALLOW_COPY_AND_ASSIGN(RemoteConsumerDataPipeImpl);
103 }; 104 };
104 105
105 } // namespace system 106 } // namespace system
106 } // namespace mojo 107 } // namespace mojo
107 108
108 #endif // MOJO_EDK_SYSTEM_REMOTE_CONSUMER_DATA_PIPE_IMPL_H_ 109 #endif // MOJO_EDK_SYSTEM_REMOTE_CONSUMER_DATA_PIPE_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/raw_channel_posix.cc ('k') | mojo/edk/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698