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

Unified Diff: mojo/edk/system/raw_channel.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/message_pipe_perftest.cc ('k') | mojo/edk/system/raw_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/raw_channel.h
diff --git a/mojo/edk/system/raw_channel.h b/mojo/edk/system/raw_channel.h
index abab3ecfc3b2d1bda7422d74529aba2cde681c8f..9ccf280a6b736f4de8ca339b1b84f855318fd0d4 100644
--- a/mojo/edk/system/raw_channel.h
+++ b/mojo/edk/system/raw_channel.h
@@ -5,6 +5,7 @@
#ifndef MOJO_EDK_SYSTEM_RAW_CHANNEL_H_
#define MOJO_EDK_SYSTEM_RAW_CHANNEL_H_
+#include <memory>
#include <vector>
#include "base/memory/scoped_ptr.h"
@@ -289,8 +290,8 @@ class MOJO_SYSTEM_IMPL_EXPORT RawChannel {
// want to preserve them if there are pending read/writes. After this is
// called, |OnReadCompleted()| must no longer be called. Must be called on the
// I/O thread.
- virtual void OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer,
- scoped_ptr<WriteBuffer> write_buffer)
+ virtual void OnShutdownNoLock(std::unique_ptr<ReadBuffer> read_buffer,
+ std::unique_ptr<WriteBuffer> write_buffer)
MOJO_EXCLUSIVE_LOCKS_REQUIRED(write_mutex_) = 0;
private:
@@ -317,11 +318,11 @@ class MOJO_SYSTEM_IMPL_EXPORT RawChannel {
// Only used on the I/O thread:
Delegate* delegate_;
bool* set_on_shutdown_;
- scoped_ptr<ReadBuffer> read_buffer_;
+ std::unique_ptr<ReadBuffer> read_buffer_;
Mutex write_mutex_; // Protects the following members.
bool write_stopped_ MOJO_GUARDED_BY(write_mutex_);
- scoped_ptr<WriteBuffer> write_buffer_ MOJO_GUARDED_BY(write_mutex_);
+ std::unique_ptr<WriteBuffer> write_buffer_ MOJO_GUARDED_BY(write_mutex_);
// This is used for posting tasks from write threads to the I/O thread. The
// weak pointers it produces are only used/invalidated on the I/O thread.
« no previous file with comments | « mojo/edk/system/message_pipe_perftest.cc ('k') | mojo/edk/system/raw_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698