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

Unified Diff: mojo/system/raw_channel_posix.cc

Issue 223783006: Mojo: Make Channel take a RawChannel rather than creating it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: spurious space Created 6 years, 9 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/system/raw_channel.cc ('k') | mojo/system/raw_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/raw_channel_posix.cc
diff --git a/mojo/system/raw_channel_posix.cc b/mojo/system/raw_channel_posix.cc
index e2f453cb744cea90bb95d660a253a72ef685801b..754b4a49ec8385f904c8e2cbf981cf51183d0636 100644
--- a/mojo/system/raw_channel_posix.cc
+++ b/mojo/system/raw_channel_posix.cc
@@ -33,9 +33,7 @@ namespace {
class RawChannelPosix : public RawChannel,
public base::MessageLoopForIO::Watcher {
public:
- RawChannelPosix(embedder::ScopedPlatformHandle handle,
- Delegate* delegate,
- base::MessageLoopForIO* message_loop_for_io);
+ RawChannelPosix(embedder::ScopedPlatformHandle handle);
virtual ~RawChannelPosix();
private:
@@ -76,11 +74,8 @@ class RawChannelPosix : public RawChannel,
DISALLOW_COPY_AND_ASSIGN(RawChannelPosix);
};
-RawChannelPosix::RawChannelPosix(embedder::ScopedPlatformHandle handle,
- Delegate* delegate,
- base::MessageLoopForIO* message_loop_for_io)
- : RawChannel(delegate, message_loop_for_io),
- fd_(handle.Pass()),
+RawChannelPosix::RawChannelPosix(embedder::ScopedPlatformHandle handle)
+ : fd_(handle.Pass()),
pending_read_(false),
pending_write_(false),
weak_ptr_factory_(this) {
@@ -335,10 +330,9 @@ void RawChannelPosix::WaitToWrite() {
// Static factory method declared in raw_channel.h.
// static
-RawChannel* RawChannel::Create(embedder::ScopedPlatformHandle handle,
- Delegate* delegate,
- base::MessageLoopForIO* message_loop_for_io) {
- return new RawChannelPosix(handle.Pass(), delegate, message_loop_for_io);
+scoped_ptr<RawChannel> RawChannel::Create(
+ embedder::ScopedPlatformHandle handle) {
+ return scoped_ptr<RawChannel>(new RawChannelPosix(handle.Pass()));
}
} // namespace system
« no previous file with comments | « mojo/system/raw_channel.cc ('k') | mojo/system/raw_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698