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

Side by Side Diff: net/dns/dns_transaction.cc

Issue 10066045: RefCounted types should not have public destructors, net/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 : hostname_(hostname), qtype_(qtype) {} 57 : hostname_(hostname), qtype_(qtype) {}
58 58
59 virtual Value* ToValue() const OVERRIDE { 59 virtual Value* ToValue() const OVERRIDE {
60 DictionaryValue* dict = new DictionaryValue(); 60 DictionaryValue* dict = new DictionaryValue();
61 dict->SetString("hostname", hostname_); 61 dict->SetString("hostname", hostname_);
62 dict->SetInteger("query_type", qtype_); 62 dict->SetInteger("query_type", qtype_);
63 return dict; 63 return dict;
64 } 64 }
65 65
66 private: 66 private:
67 virtual ~StartParameters() {}
68
67 const std::string hostname_; 69 const std::string hostname_;
68 const uint16 qtype_; 70 const uint16 qtype_;
69 }; 71 };
70 72
71 class ResponseParameters : public NetLog::EventParameters { 73 class ResponseParameters : public NetLog::EventParameters {
72 public: 74 public:
73 ResponseParameters(int rcode, int answer_count, const NetLog::Source& source) 75 ResponseParameters(int rcode, int answer_count, const NetLog::Source& source)
74 : rcode_(rcode), answer_count_(answer_count), source_(source) {} 76 : rcode_(rcode), answer_count_(answer_count), source_(source) {}
75 77
76 virtual Value* ToValue() const OVERRIDE { 78 virtual Value* ToValue() const OVERRIDE {
77 DictionaryValue* dict = new DictionaryValue(); 79 DictionaryValue* dict = new DictionaryValue();
78 dict->SetInteger("rcode", rcode_); 80 dict->SetInteger("rcode", rcode_);
79 dict->SetInteger("answer_count", answer_count_); 81 dict->SetInteger("answer_count", answer_count_);
80 dict->Set("source_dependency", source_.ToValue()); 82 dict->Set("source_dependency", source_.ToValue());
81 return dict; 83 return dict;
82 } 84 }
83 85
84 private: 86 private:
87 virtual ~ResponseParameters() {}
88
85 const int rcode_; 89 const int rcode_;
86 const int answer_count_; 90 const int answer_count_;
87 const NetLog::Source source_; 91 const NetLog::Source source_;
88 }; 92 };
89 93
90 // ---------------------------------------------------------------------------- 94 // ----------------------------------------------------------------------------
91 95
92 // A single asynchronous DNS exchange over UDP, which consists of sending out a 96 // A single asynchronous DNS exchange over UDP, which consists of sending out a
93 // DNS query, waiting for a response, and returning the response that it 97 // DNS query, waiting for a response, and returning the response that it
94 // matches. Logging is done in the socket and in the outer DnsTransaction. 98 // matches. Logging is done in the socket and in the outer DnsTransaction.
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 603
600 // static 604 // static
601 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory( 605 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory(
602 DnsSession* session) { 606 DnsSession* session) {
603 return scoped_ptr<DnsTransactionFactory>( 607 return scoped_ptr<DnsTransactionFactory>(
604 new DnsTransactionFactoryImpl(session)); 608 new DnsTransactionFactoryImpl(session));
605 } 609 }
606 610
607 } // namespace net 611 } // namespace net
608 612
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698