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

Unified Diff: net/dns/mdns_client_impl.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « net/dns/mdns_client.cc ('k') | net/dns/mock_mdns_socket_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/mdns_client_impl.cc
diff --git a/net/dns/mdns_client_impl.cc b/net/dns/mdns_client_impl.cc
index 9782ddd9939b2ea6bb71df9f983ed1195bda6564..cb717fc44b4fc1a78c0b0cc27113d32dc408a278 100644
--- a/net/dns/mdns_client_impl.cc
+++ b/net/dns/mdns_client_impl.cc
@@ -6,6 +6,7 @@
#include <algorithm>
#include <queue>
+#include <utility>
#include "base/bind.h"
#include "base/location.h"
@@ -52,18 +53,17 @@ void MDnsSocketFactoryImpl::CreateSockets(
scoped_ptr<DatagramServerSocket> socket(
CreateAndBindMDnsSocket(interfaces[i].second, interfaces[i].first));
if (socket)
- sockets->push_back(socket.Pass());
+ sockets->push_back(std::move(socket));
}
}
MDnsConnection::SocketHandler::SocketHandler(
scoped_ptr<DatagramServerSocket> socket,
MDnsConnection* connection)
- : socket_(socket.Pass()),
+ : socket_(std::move(socket)),
connection_(connection),
response_(dns_protocol::kMaxMulticastSize),
- send_in_progress_(false) {
-}
+ send_in_progress_(false) {}
MDnsConnection::SocketHandler::~SocketHandler() {
}
@@ -271,7 +271,7 @@ void MDnsClientImpl::Core::HandlePacket(DnsResponse* response,
}
MDnsCache::Key update_key = MDnsCache::Key::CreateFor(record.get());
- MDnsCache::UpdateType update = cache_.UpdateDnsRecord(record.Pass());
+ MDnsCache::UpdateType update = cache_.UpdateDnsRecord(std::move(record));
// Cleanup time may have changed.
ScheduleCleanup(cache_.next_expiration());
@@ -434,8 +434,7 @@ MDnsClientImpl::MDnsClientImpl()
MDnsClientImpl::MDnsClientImpl(scoped_ptr<base::Clock> clock,
scoped_ptr<base::Timer> timer)
- : clock_(clock.Pass()), cleanup_timer_(timer.Pass()) {
-}
+ : clock_(std::move(clock)), cleanup_timer_(std::move(timer)) {}
MDnsClientImpl::~MDnsClientImpl() {
}
« no previous file with comments | « net/dns/mdns_client.cc ('k') | net/dns/mock_mdns_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698