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

Unified Diff: mojo/edk/system/data_pipe_impl.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/core.h ('k') | mojo/edk/system/dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/data_pipe_impl.cc
diff --git a/mojo/edk/system/data_pipe_impl.cc b/mojo/edk/system/data_pipe_impl.cc
index 6c19297c6de52c7474c38cbc1da9844d90a3135a..91ddb02af82a8c75a8e990f79f4ff8e4d4e51698 100644
--- a/mojo/edk/system/data_pipe_impl.cc
+++ b/mojo/edk/system/data_pipe_impl.cc
@@ -5,9 +5,10 @@
#include "mojo/edk/system/data_pipe_impl.h"
#include <algorithm>
+#include <memory>
+#include <utility>
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "mojo/edk/system/configuration.h"
#include "mojo/edk/system/message_in_transit.h"
#include "mojo/edk/system/message_in_transit_queue.h"
@@ -34,11 +35,11 @@ void DataPipeImpl::ConvertDataToMessages(const char* buffer,
std::min(max_message_num_bytes, current_contiguous_num_bytes);
// Note: |message_num_bytes| fits in a |uint32_t| since the capacity does.
- scoped_ptr<MessageInTransit> message(new MessageInTransit(
+ std::unique_ptr<MessageInTransit> message(new MessageInTransit(
MessageInTransit::Type::ENDPOINT_CLIENT,
MessageInTransit::Subtype::ENDPOINT_CLIENT_DATA,
static_cast<uint32_t>(message_num_bytes), buffer + *start_index));
- message_queue->AddMessage(message.Pass());
+ message_queue->AddMessage(std::move(message));
DCHECK_LE(message_num_bytes, *current_num_bytes);
*start_index += message_num_bytes;
« no previous file with comments | « mojo/edk/system/core.h ('k') | mojo/edk/system/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698