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

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

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/master_connection_manager.cc ('k') | mojo/edk/system/message_in_transit.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.h
diff --git a/mojo/edk/system/message_in_transit.h b/mojo/edk/system/message_in_transit.h
index 2edc7762a63f185f0777ff1160eafb426c950229..4280b5f868bf3c4d716c58430dd2a705a68aaa23 100644
--- a/mojo/edk/system/message_in_transit.h
+++ b/mojo/edk/system/message_in_transit.h
@@ -8,11 +8,11 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <ostream>
#include <vector>
#include "base/memory/aligned_memory.h"
-#include "base/memory/scoped_ptr.h"
#include "mojo/edk/system/channel_endpoint_id.h"
#include "mojo/edk/system/dispatcher.h"
#include "mojo/edk/system/memory.h"
@@ -188,11 +188,11 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
// not be referenced from anywhere else (in particular, not from the handle
// table), i.e., each dispatcher must have a reference count of 1. This
// message must not already have dispatchers.
- void SetDispatchers(scoped_ptr<DispatcherVector> dispatchers);
+ void SetDispatchers(std::unique_ptr<DispatcherVector> dispatchers);
// Sets the |TransportData| for this message. This should only be done when
// there are no dispatchers and no existing |TransportData|.
- void SetTransportData(scoped_ptr<TransportData> transport_data);
+ void SetTransportData(std::unique_ptr<TransportData> transport_data);
// Serializes any dispatchers to the secondary buffer. This message must not
// already have a secondary buffer (so this must only be called once). The
@@ -276,15 +276,16 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
void UpdateTotalSize();
const size_t main_buffer_size_;
- const scoped_ptr<char, base::AlignedFreeDeleter> main_buffer_; // Never null.
+ // Never null.
+ const std::unique_ptr<char, base::AlignedFreeDeleter> main_buffer_;
- scoped_ptr<TransportData> transport_data_; // May be null.
+ std::unique_ptr<TransportData> transport_data_; // May be null.
// Any dispatchers that may be attached to this message. These dispatchers
// should be "owned" by this message, i.e., have a ref count of exactly 1. (We
// allow a dispatcher entry to be null, in case it couldn't be duplicated for
// some reason.)
- scoped_ptr<DispatcherVector> dispatchers_;
+ std::unique_ptr<DispatcherVector> dispatchers_;
MOJO_DISALLOW_COPY_AND_ASSIGN(MessageInTransit);
};
« no previous file with comments | « mojo/edk/system/master_connection_manager.cc ('k') | mojo/edk/system/message_in_transit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698