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

Unified Diff: net/socket/ssl_host_info.h

Issue 6041004: net: perform a non-A DNS lookup for HTTPS hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing UMA_ Created 9 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/socket/ssl_client_socket_pool.cc ('k') | net/socket/ssl_host_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_host_info.h
diff --git a/net/socket/ssl_host_info.h b/net/socket/ssl_host_info.h
index 8f1502bc6368e7714eb7b8970de9a860dbccd129..c384e2e7828b587d5fa19063336babdc25e32ac2 100644
--- a/net/socket/ssl_host_info.h
+++ b/net/socket/ssl_host_info.h
@@ -14,6 +14,7 @@
#include "net/base/cert_verifier.h"
#include "net/base/cert_verify_result.h"
#include "net/base/completion_callback.h"
+#include "net/base/dnsrr_resolver.h"
#include "net/socket/ssl_client_socket.h"
namespace net {
@@ -56,6 +57,9 @@ class SSLHostInfo {
// callback.
virtual void Persist() = 0;
+ // StartDnsLookup triggers a DNS lookup for the host.
+ void StartDnsLookup(DnsRRResolver* dnsrr_resolver);
+
struct State {
State();
~State();
@@ -119,6 +123,10 @@ class SSLHostInfo {
// ParseInner is a helper function for Parse.
bool ParseInner(const std::string& data);
+ // DnsComplete is a callback function which is called when our DNS resolution
+ // completes.
+ void DnsComplete(int rv);
+
// This is the hostname that we'll validate the certificates against.
const std::string hostname_;
bool cert_parsing_failed_;
@@ -132,6 +140,12 @@ class SSLHostInfo {
SingleRequestCertVerifier verifier_;
scoped_refptr<X509Certificate> cert_;
scoped_refptr<CancelableCompletionCallback<SSLHostInfo> > callback_;
+
+ DnsRRResolver* dnsrr_resolver_;
+ CompletionCallback* dns_callback_;
+ DnsRRResolver::Handle dns_handle_;
+ RRResponse dns_response_;
+ base::TimeTicks dns_lookup_start_time_;
};
class SSLHostInfoFactory {
« no previous file with comments | « net/socket/ssl_client_socket_pool.cc ('k') | net/socket/ssl_host_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698