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

Side by Side Diff: net/dns/dns_session.h

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_hosts.cc ('k') | net/dns/dns_session.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 #ifndef NET_DNS_DNS_SESSION_H_ 5 #ifndef NET_DNS_DNS_SESSION_H_
6 #define NET_DNS_DNS_SESSION_H_ 6 #define NET_DNS_DNS_SESSION_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 DnsSession(const DnsConfig& config, 60 DnsSession(const DnsConfig& config,
61 scoped_ptr<DnsSocketPool> socket_pool, 61 scoped_ptr<DnsSocketPool> socket_pool,
62 const RandIntCallback& rand_int_callback, 62 const RandIntCallback& rand_int_callback,
63 NetLog* net_log); 63 NetLog* net_log);
64 64
65 const DnsConfig& config() const { return config_; } 65 const DnsConfig& config() const { return config_; }
66 NetLog* net_log() const { return net_log_; } 66 NetLog* net_log() const { return net_log_; }
67 67
68 // Return the next random query ID. 68 // Return the next random query ID.
69 int NextQueryId() const; 69 uint16 NextQueryId() const;
70 70
71 // Return the index of the first configured server to use on first attempt. 71 // Return the index of the first configured server to use on first attempt.
72 unsigned NextFirstServerIndex(); 72 unsigned NextFirstServerIndex();
73 73
74 // Start with |server_index| and find the index of the next known good server 74 // Start with |server_index| and find the index of the next known good server
75 // to use on this attempt. Returns |server_index| if this server has no 75 // to use on this attempt. Returns |server_index| if this server has no
76 // recorded failures, or if there are no other servers that have not failed 76 // recorded failures, or if there are no other servers that have not failed
77 // or have failed longer time ago. 77 // or have failed longer time ago.
78 unsigned NextGoodServerIndex(unsigned server_index); 78 unsigned NextGoodServerIndex(unsigned server_index);
79 79
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 RttBuckets(); 138 RttBuckets();
139 }; 139 };
140 static base::LazyInstance<RttBuckets>::Leaky rtt_buckets_; 140 static base::LazyInstance<RttBuckets>::Leaky rtt_buckets_;
141 141
142 DISALLOW_COPY_AND_ASSIGN(DnsSession); 142 DISALLOW_COPY_AND_ASSIGN(DnsSession);
143 }; 143 };
144 144
145 } // namespace net 145 } // namespace net
146 146
147 #endif // NET_DNS_DNS_SESSION_H_ 147 #endif // NET_DNS_DNS_SESSION_H_
OLDNEW
« no previous file with comments | « net/dns/dns_hosts.cc ('k') | net/dns/dns_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698