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

Unified Diff: mojo/edk/system/remote_producer_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/remote_message_pipe_unittest.cc ('k') | mojo/edk/system/remote_producer_data_pipe_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/remote_producer_data_pipe_impl.h
diff --git a/mojo/edk/system/remote_producer_data_pipe_impl.h b/mojo/edk/system/remote_producer_data_pipe_impl.h
index 49a1a3439992e4a4bf32bd68e9a49ad143c9cc8c..1b72fc6f2f336dd722263db7841658d2be39f4b2 100644
--- a/mojo/edk/system/remote_producer_data_pipe_impl.h
+++ b/mojo/edk/system/remote_producer_data_pipe_impl.h
@@ -5,9 +5,10 @@
#ifndef MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_
#define MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_
+#include <memory>
+
#include "base/memory/aligned_memory.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "mojo/edk/system/channel_endpoint.h"
#include "mojo/edk/system/data_pipe_impl.h"
#include "mojo/edk/system/system_impl_export.h"
@@ -25,10 +26,11 @@ class MOJO_SYSTEM_IMPL_EXPORT RemoteProducerDataPipeImpl final
: public DataPipeImpl {
public:
explicit RemoteProducerDataPipeImpl(ChannelEndpoint* channel_endpoint);
- RemoteProducerDataPipeImpl(ChannelEndpoint* channel_endpoint,
- scoped_ptr<char, base::AlignedFreeDeleter> buffer,
- size_t start_index,
- size_t current_num_bytes);
+ RemoteProducerDataPipeImpl(
+ ChannelEndpoint* channel_endpoint,
+ std::unique_ptr<char, base::AlignedFreeDeleter> buffer,
+ size_t start_index,
+ size_t current_num_bytes);
~RemoteProducerDataPipeImpl() override;
// Processes messages that were received and queued by an |IncomingEndpoint|.
@@ -38,7 +40,7 @@ class MOJO_SYSTEM_IMPL_EXPORT RemoteProducerDataPipeImpl final
static bool ProcessMessagesFromIncomingEndpoint(
const MojoCreateDataPipeOptions& validated_options,
MessageInTransitQueue* messages,
- scoped_ptr<char, base::AlignedFreeDeleter>* buffer,
+ std::unique_ptr<char, base::AlignedFreeDeleter>* buffer,
size_t* buffer_num_bytes);
private:
@@ -107,7 +109,7 @@ class MOJO_SYSTEM_IMPL_EXPORT RemoteProducerDataPipeImpl final
// Should be valid if and only if |producer_open()| returns true.
scoped_refptr<ChannelEndpoint> channel_endpoint_;
- scoped_ptr<char, base::AlignedFreeDeleter> buffer_;
+ std::unique_ptr<char, base::AlignedFreeDeleter> buffer_;
// Circular buffer.
size_t start_index_;
size_t current_num_bytes_;
« no previous file with comments | « mojo/edk/system/remote_message_pipe_unittest.cc ('k') | mojo/edk/system/remote_producer_data_pipe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698