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

Side by Side Diff: remoting/protocol/stream_message_pipe_adapter.cc

Issue 2253233004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « remoting/protocol/ssl_hmac_channel_authenticator.cc ('k') | remoting/protocol/transport_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698