| Index: net/dns/dns_transaction.cc
|
| diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
|
| index 014709220af4715e0fd89823c251ed191c0c0801..d0357f89dff1223188843c3a75d9e4a46d88806a 100644
|
| --- a/net/dns/dns_transaction.cc
|
| +++ b/net/dns/dns_transaction.cc
|
| @@ -58,13 +58,14 @@ bool IsIPLiteral(const std::string& hostname) {
|
| return ParseIPLiteralToNumber(hostname, &ip);
|
| }
|
|
|
| -base::Value* NetLogStartCallback(const std::string* hostname,
|
| - uint16 qtype,
|
| - NetLogCaptureMode /* capture_mode */) {
|
| - base::DictionaryValue* dict = new base::DictionaryValue();
|
| +scoped_ptr<base::Value> NetLogStartCallback(
|
| + const std::string* hostname,
|
| + uint16 qtype,
|
| + NetLogCaptureMode /* capture_mode */) {
|
| + scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
|
| dict->SetString("hostname", *hostname);
|
| dict->SetInteger("query_type", qtype);
|
| - return dict;
|
| + return dict.Pass();
|
| };
|
|
|
| // ----------------------------------------------------------------------------
|
| @@ -98,14 +99,15 @@ class DnsAttempt {
|
| // Returns a Value representing the received response, along with a reference
|
| // to the NetLog source source of the UDP socket used. The request must have
|
| // completed before this is called.
|
| - base::Value* NetLogResponseCallback(NetLogCaptureMode capture_mode) const {
|
| + scoped_ptr<base::Value> NetLogResponseCallback(
|
| + NetLogCaptureMode capture_mode) const {
|
| DCHECK(GetResponse()->IsValid());
|
|
|
| - base::DictionaryValue* dict = new base::DictionaryValue();
|
| + scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
|
| dict->SetInteger("rcode", GetResponse()->rcode());
|
| dict->SetInteger("answer_count", GetResponse()->answer_count());
|
| - GetSocketNetLog().source().AddToEventParameters(dict);
|
| - return dict;
|
| + GetSocketNetLog().source().AddToEventParameters(dict.get());
|
| + return dict.Pass();
|
| }
|
|
|
| void set_result(int result) {
|
| @@ -592,7 +594,7 @@ class DnsTransactionImpl : public DnsTransaction,
|
| DCHECK(!callback_.is_null());
|
| DCHECK(attempts_.empty());
|
| net_log_.BeginEvent(NetLog::TYPE_DNS_TRANSACTION,
|
| - base::Bind(&NetLogStartCallback, &hostname_, qtype_));
|
| + base::Bind(NetLogStartCallback, &hostname_, qtype_));
|
| AttemptResult result(PrepareSearch(), NULL);
|
| if (result.rv == OK) {
|
| qnames_initial_size_ = qnames_.size();
|
|
|