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

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

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/raw_channel.cc ('k') | mojo/edk/system/remote_consumer_data_pipe_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/raw_channel_posix.cc
diff --git a/mojo/edk/system/raw_channel_posix.cc b/mojo/edk/system/raw_channel_posix.cc
index 03b3d053f3fb74a67ffee4d15ac49173d1d789bc..a40a5d5b130884832ee8f83dd2de593e326c40b0 100644
--- a/mojo/edk/system/raw_channel_posix.cc
+++ b/mojo/edk/system/raw_channel_posix.cc
@@ -10,6 +10,7 @@
#include <algorithm>
#include <deque>
+#include <memory>
#include "base/bind.h"
#include "base/location.h"
@@ -55,8 +56,8 @@ class RawChannelPosix final : public RawChannel,
size_t* bytes_written) override;
IOResult ScheduleWriteNoLock() override;
void OnInit() override;
- void OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer,
- scoped_ptr<WriteBuffer> write_buffer) override;
+ void OnShutdownNoLock(std::unique_ptr<ReadBuffer> read_buffer,
+ std::unique_ptr<WriteBuffer> write_buffer) override;
// |base::MessageLoopForIO::Watcher| implementation:
void OnFileCanReadWithoutBlocking(int fd) override;
@@ -71,8 +72,8 @@ class RawChannelPosix final : public RawChannel,
embedder::ScopedPlatformHandle fd_;
// The following members are only used on the I/O thread:
- scoped_ptr<base::MessageLoopForIO::FileDescriptorWatcher> read_watcher_;
- scoped_ptr<base::MessageLoopForIO::FileDescriptorWatcher> write_watcher_;
+ std::unique_ptr<base::MessageLoopForIO::FileDescriptorWatcher> read_watcher_;
+ std::unique_ptr<base::MessageLoopForIO::FileDescriptorWatcher> write_watcher_;
bool pending_read_;
@@ -327,8 +328,8 @@ void RawChannelPosix::OnInit() {
}
void RawChannelPosix::OnShutdownNoLock(
- scoped_ptr<ReadBuffer> /*read_buffer*/,
- scoped_ptr<WriteBuffer> /*write_buffer*/) {
+ std::unique_ptr<ReadBuffer> /*read_buffer*/,
+ std::unique_ptr<WriteBuffer> /*write_buffer*/) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_for_io());
write_mutex().AssertHeld();
« no previous file with comments | « mojo/edk/system/raw_channel.cc ('k') | mojo/edk/system/remote_consumer_data_pipe_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698