| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/edk/system/raw_channel.h" | 5 #include "mojo/edk/system/raw_channel.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <sys/uio.h> | 8 #include <sys/uio.h> |
| 9 #include <unistd.h> | 9 #include <unistd.h> |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <deque> | 12 #include <deque> |
| 13 #include <memory> | 13 #include <memory> |
| 14 | 14 |
| 15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/location.h" | 16 #include "base/location.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/memory/scoped_ptr.h" | |
| 19 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 20 #include "base/message_loop/message_loop.h" | 19 #include "base/message_loop/message_loop.h" |
| 21 #include "mojo/edk/embedder/platform_channel_utils_posix.h" | 20 #include "mojo/edk/embedder/platform_channel_utils_posix.h" |
| 22 #include "mojo/edk/embedder/platform_handle.h" | 21 #include "mojo/edk/embedder/platform_handle.h" |
| 23 #include "mojo/edk/embedder/platform_handle_vector.h" | 22 #include "mojo/edk/embedder/platform_handle_vector.h" |
| 24 #include "mojo/edk/system/transport_data.h" | 23 #include "mojo/edk/system/transport_data.h" |
| 25 #include "mojo/edk/util/make_unique.h" | 24 #include "mojo/edk/util/make_unique.h" |
| 26 #include "mojo/public/cpp/system/macros.h" | 25 #include "mojo/public/cpp/system/macros.h" |
| 27 | 26 |
| 28 namespace mojo { | 27 namespace mojo { |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 return; // |this| may have been destroyed in |OnWriteCompleted()|. | 462 return; // |this| may have been destroyed in |OnWriteCompleted()|. |
| 464 } | 463 } |
| 465 } | 464 } |
| 466 | 465 |
| 467 } // namespace | 466 } // namespace |
| 468 | 467 |
| 469 // ----------------------------------------------------------------------------- | 468 // ----------------------------------------------------------------------------- |
| 470 | 469 |
| 471 // Static factory method declared in raw_channel.h. | 470 // Static factory method declared in raw_channel.h. |
| 472 // static | 471 // static |
| 473 scoped_ptr<RawChannel> RawChannel::Create( | 472 std::unique_ptr<RawChannel> RawChannel::Create( |
| 474 embedder::ScopedPlatformHandle handle) { | 473 embedder::ScopedPlatformHandle handle) { |
| 475 return make_scoped_ptr(new RawChannelPosix(handle.Pass())); | 474 return util::MakeUnique<RawChannelPosix>(handle.Pass()); |
| 476 } | 475 } |
| 477 | 476 |
| 478 } // namespace system | 477 } // namespace system |
| 479 } // namespace mojo | 478 } // namespace mojo |
| OLD | NEW |