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

Unified Diff: remoting/protocol/port_allocator.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 | « remoting/protocol/port_allocator.h ('k') | remoting/protocol/port_allocator_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/port_allocator.cc
diff --git a/remoting/protocol/port_allocator.cc b/remoting/protocol/port_allocator.cc
index 3f6684aa42c4a19d89085b52c924e67e2f5e1739..5a0666886139190a2129a153ae684b6e5f530792 100644
--- a/remoting/protocol/port_allocator.cc
+++ b/remoting/protocol/port_allocator.cc
@@ -41,8 +41,8 @@ namespace remoting {
namespace protocol {
PortAllocator::PortAllocator(
- scoped_ptr<rtc::NetworkManager> network_manager,
- scoped_ptr<rtc::PacketSocketFactory> socket_factory,
+ std::unique_ptr<rtc::NetworkManager> network_manager,
+ std::unique_ptr<rtc::PacketSocketFactory> socket_factory,
scoped_refptr<TransportContext> transport_context)
: BasicPortAllocator(network_manager.get(), socket_factory.get()),
network_manager_(std::move(network_manager)),
@@ -110,14 +110,14 @@ void PortAllocatorSession::OnIceConfig(const IceConfig& ice_config) {
}
}
-scoped_ptr<cricket::PortConfiguration>
+std::unique_ptr<cricket::PortConfiguration>
PortAllocatorSession::GetPortConfiguration() {
cricket::ServerAddresses stun_servers;
for (const auto& host : ice_config_.stun_servers) {
stun_servers.insert(host);
}
- scoped_ptr<cricket::PortConfiguration> config(
+ std::unique_ptr<cricket::PortConfiguration> config(
new cricket::PortConfiguration(stun_servers, username(), password()));
if (relay_enabled()) {
@@ -150,7 +150,7 @@ void PortAllocatorSession::TryCreateRelaySession() {
net::EscapeUrlEncodedData(username(), false) +
"&password=" +
net::EscapeUrlEncodedData(password(), false) + "&sn=1";
- scoped_ptr<UrlRequest> url_request =
+ std::unique_ptr<UrlRequest> url_request =
transport_context_->url_request_factory()->CreateUrlRequest(
UrlRequest::Type::GET, url);
url_request->AddHeader("X-Talk-Google-Relay-Auth: " +
@@ -180,7 +180,7 @@ void PortAllocatorSession::OnSessionRequestResult(
LOG(WARNING) << "Received unexpected password value from relay server.";
}
- scoped_ptr<cricket::PortConfiguration> config = GetPortConfiguration();
+ std::unique_ptr<cricket::PortConfiguration> config = GetPortConfiguration();
std::string relay_ip = map["relay.ip"];
std::string relay_port = map["relay.udp_port"];
« no previous file with comments | « remoting/protocol/port_allocator.h ('k') | remoting/protocol/port_allocator_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698