| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "remoting/protocol/stream_message_pipe_adapter.h" | 5 #include "remoting/protocol/stream_message_pipe_adapter.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 stream_channel_factory_->CancelChannelCreation(name); | 80 stream_channel_factory_->CancelChannelCreation(name); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void StreamMessageChannelFactoryAdapter::OnChannelCreated( | 83 void StreamMessageChannelFactoryAdapter::OnChannelCreated( |
| 84 const ChannelCreatedCallback& callback, | 84 const ChannelCreatedCallback& callback, |
| 85 std::unique_ptr<P2PStreamSocket> socket) { | 85 std::unique_ptr<P2PStreamSocket> socket) { |
| 86 if (!socket) { | 86 if (!socket) { |
| 87 error_callback_.Run(net::ERR_FAILED); | 87 error_callback_.Run(net::ERR_FAILED); |
| 88 return; | 88 return; |
| 89 } | 89 } |
| 90 callback.Run(base::WrapUnique( | 90 callback.Run(base::MakeUnique<StreamMessagePipeAdapter>(std::move(socket), |
| 91 new StreamMessagePipeAdapter(std::move(socket), error_callback_))); | 91 error_callback_)); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace protocol | 94 } // namespace protocol |
| 95 } // namespace remoting | 95 } // namespace remoting |
| OLD | NEW |