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

Side by Side Diff: remoting/protocol/transport_context.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
« no previous file with comments | « remoting/protocol/stream_message_pipe_adapter.cc ('k') | remoting/protocol/video_frame_pump.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/transport_context.h" 5 #include "remoting/protocol/transport_context.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 13 matching lines...) Expand all
24 #endif // !defined(OS_NACL) 24 #endif // !defined(OS_NACL)
25 25
26 namespace remoting { 26 namespace remoting {
27 namespace protocol { 27 namespace protocol {
28 28
29 #if !defined(OS_NACL) 29 #if !defined(OS_NACL)
30 // static 30 // static
31 scoped_refptr<TransportContext> TransportContext::ForTests(TransportRole role) { 31 scoped_refptr<TransportContext> TransportContext::ForTests(TransportRole role) {
32 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); 32 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
33 return new protocol::TransportContext( 33 return new protocol::TransportContext(
34 nullptr, base::WrapUnique(new protocol::ChromiumPortAllocatorFactory()), 34 nullptr, base::MakeUnique<protocol::ChromiumPortAllocatorFactory>(),
35 nullptr, protocol::NetworkSettings( 35 nullptr, protocol::NetworkSettings(
36 protocol::NetworkSettings::NAT_TRAVERSAL_OUTGOING), 36 protocol::NetworkSettings::NAT_TRAVERSAL_OUTGOING),
37 role); 37 role);
38 } 38 }
39 #endif // !defined(OS_NACL) 39 #endif // !defined(OS_NACL)
40 40
41 TransportContext::TransportContext( 41 TransportContext::TransportContext(
42 SignalStrategy* signal_strategy, 42 SignalStrategy* signal_strategy,
43 std::unique_ptr<PortAllocatorFactory> port_allocator_factory, 43 std::unique_ptr<PortAllocatorFactory> port_allocator_factory,
44 std::unique_ptr<UrlRequestFactory> url_request_factory, 44 std::unique_ptr<UrlRequestFactory> url_request_factory,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 auto& callback_list = pending_ice_config_callbacks_[relay_mode]; 109 auto& callback_list = pending_ice_config_callbacks_[relay_mode];
110 while (!callback_list.empty()) { 110 while (!callback_list.empty()) {
111 callback_list.begin()->Run(ice_config); 111 callback_list.begin()->Run(ice_config);
112 callback_list.pop_front(); 112 callback_list.pop_front();
113 } 113 }
114 } 114 }
115 115
116 } // namespace protocol 116 } // namespace protocol
117 } // namespace remoting 117 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/stream_message_pipe_adapter.cc ('k') | remoting/protocol/video_frame_pump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698