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

Unified Diff: net/dns/dns_transaction.cc

Issue 1352233002: Returning scoped_ptr<> instead of raw pointer in DnsQuery::CloneWithNewId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « net/dns/dns_response_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_transaction.cc
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index f60ae26e27d76f43eb98fe536fdd5ddd55724a15..148d248ccb513ba93a677018475640e01658f40c 100644
--- a/net/dns/dns_transaction.cc
+++ b/net/dns/dns_transaction.cc
@@ -708,7 +708,7 @@ class DnsTransactionImpl : public DnsTransaction,
if (attempts_.empty()) {
query.reset(new DnsQuery(id, qnames_.front(), qtype_));
} else {
- query.reset(attempts_[0]->GetQuery()->CloneWithNewId(id));
+ query = attempts_[0]->GetQuery()->CloneWithNewId(id);
}
const DnsConfig& config = session_->config();
@@ -759,8 +759,8 @@ class DnsTransactionImpl : public DnsTransaction,
// TODO(szym): Reuse the same id to help the server?
uint16 id = session_->NextQueryId();
- scoped_ptr<DnsQuery> query(
- previous_attempt->GetQuery()->CloneWithNewId(id));
+ scoped_ptr<DnsQuery> query =
+ previous_attempt->GetQuery()->CloneWithNewId(id);
RecordLostPacketsIfAny();
// Cancel all other attempts, no point waiting on them.
« no previous file with comments | « net/dns/dns_response_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698