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

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

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller 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 unified diff | Download patch
« no previous file with comments | « net/dns/dns_config_service.h ('k') | net/http/http_response_body_drainer.h » ('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 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 954
955 // List of attempts for the current name. 955 // List of attempts for the current name.
956 ScopedVector<DnsAttempt> attempts_; 956 ScopedVector<DnsAttempt> attempts_;
957 // Count of attempts, not reset when |attempts_| vector is cleared. 957 // Count of attempts, not reset when |attempts_| vector is cleared.
958 int attempts_count_; 958 int attempts_count_;
959 bool had_tcp_attempt_; 959 bool had_tcp_attempt_;
960 960
961 // Index of the first server to try on each search query. 961 // Index of the first server to try on each search query.
962 int first_server_index_; 962 int first_server_index_;
963 963
964 base::OneShotTimer<DnsTransactionImpl> timer_; 964 base::OneShotTimer timer_;
965 965
966 DISALLOW_COPY_AND_ASSIGN(DnsTransactionImpl); 966 DISALLOW_COPY_AND_ASSIGN(DnsTransactionImpl);
967 }; 967 };
968 968
969 // ---------------------------------------------------------------------------- 969 // ----------------------------------------------------------------------------
970 970
971 // Implementation of DnsTransactionFactory that returns instances of 971 // Implementation of DnsTransactionFactory that returns instances of
972 // DnsTransactionImpl. 972 // DnsTransactionImpl.
973 class DnsTransactionFactoryImpl : public DnsTransactionFactory { 973 class DnsTransactionFactoryImpl : public DnsTransactionFactory {
974 public: 974 public:
(...skipping 17 matching lines...) Expand all
992 } // namespace 992 } // namespace
993 993
994 // static 994 // static
995 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory( 995 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory(
996 DnsSession* session) { 996 DnsSession* session) {
997 return scoped_ptr<DnsTransactionFactory>( 997 return scoped_ptr<DnsTransactionFactory>(
998 new DnsTransactionFactoryImpl(session)); 998 new DnsTransactionFactoryImpl(session));
999 } 999 }
1000 1000
1001 } // namespace net 1001 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_config_service.h ('k') | net/http/http_response_body_drainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698