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

Unified Diff: net/dns/dns_session.h

Issue 9190031: DnsClient refactoring + features (timeout, suffix search, server rotation). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Delinted. Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/dns_response_unittest.cc ('k') | net/dns/dns_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_session.h
diff --git a/net/dns/dns_session.h b/net/dns/dns_session.h
index df986ea1b807fe3edad14d498ad0d9dfe57675e0..85aea0ae12a28efb99ab1e766642b98bfda23642 100644
--- a/net/dns/dns_session.h
+++ b/net/dns/dns_session.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -31,17 +31,18 @@ class NET_EXPORT_PRIVATE DnsSession
const RandIntCallback& rand_int_callback,
NetLog* net_log);
- ClientSocketFactory* socket_factory() const { return socket_factory_.get(); }
const DnsConfig& config() const { return config_; }
NetLog* net_log() const { return net_log_; }
+ ClientSocketFactory* socket_factory() { return socket_factory_.get(); }
+
// Return the next random query ID.
- int NextId() const;
+ int NextQueryId() const;
- // Return the next server address.
- const IPEndPoint& NextServer();
+ // Return the index of the first configured server to use on first attempt.
+ int NextFirstServerIndex();
- // Return the timeout for the next transaction.
+ // Return the timeout for the next query.
base::TimeDelta NextTimeout(int attempt);
private:
@@ -53,13 +54,12 @@ class NET_EXPORT_PRIVATE DnsSession
RandCallback rand_callback_;
NetLog* net_log_;
- // Current index into |config_.nameservers|.
+ // Current index into |config_.nameservers| to begin resolution with.
int server_index_;
- // TODO(szym): add current RTT estimate
- // TODO(szym): add flag to indicate DNSSEC is supported
- // TODO(szym): add TCP connection pool to support DNS over TCP
- // TODO(szym): add UDP socket pool ?
+ // TODO(szym): Add current RTT estimate.
+ // TODO(szym): Add TCP connection pool to support DNS over TCP.
+ // TODO(szym): Add UDP port pool to avoid NAT table overload.
DISALLOW_COPY_AND_ASSIGN(DnsSession);
};
« no previous file with comments | « net/dns/dns_response_unittest.cc ('k') | net/dns/dns_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698