Index: webrtc/base/network.cc |
diff --git a/webrtc/base/network.cc b/webrtc/base/network.cc |
index c9ad181776507b063e8e3f87aa5ca927c1f5ef8c..b6caaa8bbf0fed426269db828dfddca8ecea2a99 100644 |
--- a/webrtc/base/network.cc |
+++ b/webrtc/base/network.cc |
@@ -32,10 +32,10 @@ |
#include <stdio.h> |
#include <algorithm> |
+#include <memory> |
#include "webrtc/base/logging.h" |
#include "webrtc/base/networkmonitor.h" |
-#include "webrtc/base/scoped_ptr.h" |
#include "webrtc/base/socket.h" // includes something that makes windows happy |
#include "webrtc/base/stream.h" |
#include "webrtc/base/stringencode.h" |
@@ -471,9 +471,9 @@ void BasicNetworkManager::ConvertIfAddrs(struct ifaddrs* interfaces, |
} |
#endif |
// TODO(phoglund): Need to recognize other types as well. |
- scoped_ptr<Network> network(new Network(cursor->ifa_name, |
- cursor->ifa_name, prefix, |
- prefix_length, adapter_type)); |
+ std::unique_ptr<Network> network( |
+ new Network(cursor->ifa_name, cursor->ifa_name, prefix, prefix_length, |
+ adapter_type)); |
network->set_default_local_address_provider(this); |
network->set_scope_id(scope_id); |
network->AddIP(ip); |
@@ -497,7 +497,7 @@ bool BasicNetworkManager::CreateNetworks(bool include_ignored, |
return false; |
} |
- rtc::scoped_ptr<IfAddrsConverter> ifaddrs_converter(CreateIfAddrsConverter()); |
+ std::unique_ptr<IfAddrsConverter> ifaddrs_converter(CreateIfAddrsConverter()); |
ConvertIfAddrs(interfaces, ifaddrs_converter.get(), include_ignored, |
networks); |
@@ -553,7 +553,7 @@ bool BasicNetworkManager::CreateNetworks(bool include_ignored, |
NetworkMap current_networks; |
// MSDN recommends a 15KB buffer for the first try at GetAdaptersAddresses. |
size_t buffer_size = 16384; |
- scoped_ptr<char[]> adapter_info(new char[buffer_size]); |
+ std::unique_ptr<char[]> adapter_info(new char[buffer_size]); |
PIP_ADAPTER_ADDRESSES adapter_addrs = |
reinterpret_cast<PIP_ADAPTER_ADDRESSES>(adapter_info.get()); |
int adapter_flags = (GAA_FLAG_SKIP_DNS_SERVER | GAA_FLAG_SKIP_ANYCAST | |
@@ -589,7 +589,7 @@ bool BasicNetworkManager::CreateNetworks(bool include_ignored, |
IPAddress ip; |
int scope_id = 0; |
- scoped_ptr<Network> network; |
+ std::unique_ptr<Network> network; |
switch (address->Address.lpSockaddr->sa_family) { |
case AF_INET: { |
sockaddr_in* v4_addr = |
@@ -628,8 +628,8 @@ bool BasicNetworkManager::CreateNetworks(bool include_ignored, |
// TODO(phoglund): Need to recognize other types as well. |
adapter_type = ADAPTER_TYPE_LOOPBACK; |
} |
- scoped_ptr<Network> network(new Network(name, description, prefix, |
- prefix_length, adapter_type)); |
+ std::unique_ptr<Network> network(new Network( |
+ name, description, prefix, prefix_length, adapter_type)); |
network->set_default_local_address_provider(this); |
network->set_scope_id(scope_id); |
network->AddIP(ip); |
@@ -792,7 +792,7 @@ IPAddress BasicNetworkManager::QueryDefaultLocalAddress(int family) const { |
ASSERT(thread_->socketserver() != nullptr); |
ASSERT(family == AF_INET || family == AF_INET6); |
- scoped_ptr<AsyncSocket> socket( |
+ std::unique_ptr<AsyncSocket> socket( |
thread_->socketserver()->CreateAsyncSocket(family, SOCK_DGRAM)); |
if (!socket) { |
LOG_ERR(LERROR) << "Socket creation failed"; |