| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/dns/dns_transaction.h" | 5 #include "net/dns/dns_transaction.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 // Returns the net log bound to the source of the socket. | 91 // Returns the net log bound to the source of the socket. |
| 92 virtual const BoundNetLog& GetSocketNetLog() const = 0; | 92 virtual const BoundNetLog& GetSocketNetLog() const = 0; |
| 93 | 93 |
| 94 // Returns the index of the destination server within DnsConfig::nameservers. | 94 // Returns the index of the destination server within DnsConfig::nameservers. |
| 95 unsigned server_index() const { return server_index_; } | 95 unsigned server_index() const { return server_index_; } |
| 96 | 96 |
| 97 // Returns a Value representing the received response, along with a reference | 97 // Returns a Value representing the received response, along with a reference |
| 98 // to the NetLog source source of the UDP socket used. The request must have | 98 // to the NetLog source source of the UDP socket used. The request must have |
| 99 // completed before this is called. | 99 // completed before this is called. |
| 100 Value* NetLogResponseCallback(NetLog::LogLevel log_level) const { | 100 base::Value* NetLogResponseCallback(NetLog::LogLevel log_level) const { |
| 101 DCHECK(GetResponse()->IsValid()); | 101 DCHECK(GetResponse()->IsValid()); |
| 102 | 102 |
| 103 base::DictionaryValue* dict = new base::DictionaryValue(); | 103 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 104 dict->SetInteger("rcode", GetResponse()->rcode()); | 104 dict->SetInteger("rcode", GetResponse()->rcode()); |
| 105 dict->SetInteger("answer_count", GetResponse()->answer_count()); | 105 dict->SetInteger("answer_count", GetResponse()->answer_count()); |
| 106 GetSocketNetLog().source().AddToEventParameters(dict); | 106 GetSocketNetLog().source().AddToEventParameters(dict); |
| 107 return dict; | 107 return dict; |
| 108 } | 108 } |
| 109 | 109 |
| 110 void set_result(int result) { | 110 void set_result(int result) { |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 } // namespace | 951 } // namespace |
| 952 | 952 |
| 953 // static | 953 // static |
| 954 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory( | 954 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory( |
| 955 DnsSession* session) { | 955 DnsSession* session) { |
| 956 return scoped_ptr<DnsTransactionFactory>( | 956 return scoped_ptr<DnsTransactionFactory>( |
| 957 new DnsTransactionFactoryImpl(session)); | 957 new DnsTransactionFactoryImpl(session)); |
| 958 } | 958 } |
| 959 | 959 |
| 960 } // namespace net | 960 } // namespace net |
| OLD | NEW |