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

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

Issue 1350183002: EDK: More scoped_ptr -> std::unique_ptr conversions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: gah 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/message_in_transit.h ('k') | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_in_transit.cc
diff --git a/mojo/edk/system/message_in_transit.cc b/mojo/edk/system/message_in_transit.cc
index 7ac54e1afdfe82f7d7795802184074ad7b631962..771c155cba4df3aaef5048e1438831b39668c99f 100644
--- a/mojo/edk/system/message_in_transit.cc
+++ b/mojo/edk/system/message_in_transit.cc
@@ -6,7 +6,7 @@
#include <string.h>
-#include <ostream>
+#include <utility>
#include "base/logging.h"
#include "mojo/edk/system/configuration.h"
@@ -144,12 +144,12 @@ bool MessageInTransit::GetNextMessageSize(const void* buffer,
}
void MessageInTransit::SetDispatchers(
- scoped_ptr<DispatcherVector> dispatchers) {
+ std::unique_ptr<DispatcherVector> dispatchers) {
DCHECK(dispatchers);
DCHECK(!dispatchers_);
DCHECK(!transport_data_);
- dispatchers_ = dispatchers.Pass();
+ dispatchers_ = std::move(dispatchers);
#ifndef NDEBUG
for (size_t i = 0; i < dispatchers_->size(); i++)
DCHECK(!(*dispatchers_)[i] || (*dispatchers_)[i]->HasOneRef());
@@ -157,12 +157,12 @@ void MessageInTransit::SetDispatchers(
}
void MessageInTransit::SetTransportData(
- scoped_ptr<TransportData> transport_data) {
+ std::unique_ptr<TransportData> transport_data) {
DCHECK(transport_data);
DCHECK(!transport_data_);
DCHECK(!dispatchers_);
- transport_data_ = transport_data.Pass();
+ transport_data_ = std::move(transport_data);
UpdateTotalSize();
}
@@ -173,7 +173,7 @@ void MessageInTransit::SerializeAndCloseDispatchers(Channel* channel) {
if (!dispatchers_ || !dispatchers_->size())
return;
- transport_data_.reset(new TransportData(dispatchers_.Pass(), channel));
+ transport_data_.reset(new TransportData(std::move(dispatchers_), channel));
// Update the sizes in the message header.
UpdateTotalSize();
« no previous file with comments | « mojo/edk/system/message_in_transit.h ('k') | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698