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

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: Deprecated cookiestore fix Created 8 years, 7 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
« no previous file with comments | « net/disk_cache/net_log_parameters.cc ('k') | net/http/http_pipelined_connection_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 uint16 qtype) 56 uint16 qtype)
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 protected:
67 virtual ~StartParameters() {}
68
66 private: 69 private:
67 const std::string hostname_; 70 const std::string hostname_;
68 const uint16 qtype_; 71 const uint16 qtype_;
69 }; 72 };
70 73
71 class ResponseParameters : public NetLog::EventParameters { 74 class ResponseParameters : public NetLog::EventParameters {
72 public: 75 public:
73 ResponseParameters(int rcode, int answer_count, const NetLog::Source& source) 76 ResponseParameters(int rcode, int answer_count, const NetLog::Source& source)
74 : rcode_(rcode), answer_count_(answer_count), source_(source) {} 77 : rcode_(rcode), answer_count_(answer_count), source_(source) {}
75 78
76 virtual Value* ToValue() const OVERRIDE { 79 virtual Value* ToValue() const OVERRIDE {
77 DictionaryValue* dict = new DictionaryValue(); 80 DictionaryValue* dict = new DictionaryValue();
78 dict->SetInteger("rcode", rcode_); 81 dict->SetInteger("rcode", rcode_);
79 dict->SetInteger("answer_count", answer_count_); 82 dict->SetInteger("answer_count", answer_count_);
80 dict->Set("source_dependency", source_.ToValue()); 83 dict->Set("source_dependency", source_.ToValue());
81 return dict; 84 return dict;
82 } 85 }
83 86
87 protected:
88 virtual ~ResponseParameters() {}
89
84 private: 90 private:
85 const int rcode_; 91 const int rcode_;
86 const int answer_count_; 92 const int answer_count_;
87 const NetLog::Source source_; 93 const NetLog::Source source_;
88 }; 94 };
89 95
90 // ---------------------------------------------------------------------------- 96 // ----------------------------------------------------------------------------
91 97
92 // A single asynchronous DNS exchange over UDP, which consists of sending out a 98 // 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 99 // DNS query, waiting for a response, and returning the response that it
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 605
600 // static 606 // static
601 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory( 607 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory(
602 DnsSession* session) { 608 DnsSession* session) {
603 return scoped_ptr<DnsTransactionFactory>( 609 return scoped_ptr<DnsTransactionFactory>(
604 new DnsTransactionFactoryImpl(session)); 610 new DnsTransactionFactoryImpl(session));
605 } 611 }
606 612
607 } // namespace net 613 } // namespace net
608 614
OLDNEW
« no previous file with comments | « net/disk_cache/net_log_parameters.cc ('k') | net/http/http_pipelined_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698