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

Side by Side Diff: net/socket/ssl_host_info.h

Issue 7715007: Do not call callback->Run() until we are about to return from this (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add ssl_host_info.h to the CL. Created 9 years, 4 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/http/http_cache_unittest.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SOCKET_SSL_HOST_INFO_H_ 5 #ifndef NET_SOCKET_SSL_HOST_INFO_H_
6 #define NET_SOCKET_SSL_HOST_INFO_H_ 6 #define NET_SOCKET_SSL_HOST_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "net/base/cert_verifier.h" 14 #include "net/base/cert_verifier.h"
15 #include "net/base/cert_verify_result.h" 15 #include "net/base/cert_verify_result.h"
16 #include "net/base/completion_callback.h" 16 #include "net/base/completion_callback.h"
17 #include "net/base/dnsrr_resolver.h" 17 #include "net/base/dnsrr_resolver.h"
18 #include "net/base/net_export.h"
18 #include "net/socket/ssl_client_socket.h" 19 #include "net/socket/ssl_client_socket.h"
19 20
20 namespace net { 21 namespace net {
21 22
22 class X509Certificate; 23 class X509Certificate;
23 struct SSLConfig; 24 struct SSLConfig;
24 25
25 // SSLHostInfo is an interface for fetching information about an SSL server. 26 // SSLHostInfo is an interface for fetching information about an SSL server.
26 // This information may be stored on disk so does not include keys or session 27 // This information may be stored on disk so does not include keys or session
27 // information etc. Primarily it's intended for caching the server's 28 // information etc. Primarily it's intended for caching the server's
28 // certificates. 29 // certificates.
29 class SSLHostInfo { 30 class NET_EXPORT_PRIVATE SSLHostInfo {
30 public: 31 public:
31 SSLHostInfo(const std::string& hostname, 32 SSLHostInfo(const std::string& hostname,
32 const SSLConfig& ssl_config, 33 const SSLConfig& ssl_config,
33 CertVerifier *certVerifier); 34 CertVerifier *certVerifier);
34 virtual ~SSLHostInfo(); 35 virtual ~SSLHostInfo();
35 36
36 // Start will commence the lookup. This must be called before any other 37 // Start will commence the lookup. This must be called before any other
37 // methods. By opportunistically calling this early, it may be possible to 38 // methods. By opportunistically calling this early, it may be possible to
38 // overlap this object's lookup and reduce latency. 39 // overlap this object's lookup and reduce latency.
39 virtual void Start() = 0; 40 virtual void Start() = 0;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 144
144 // GetForHost returns a fresh, allocated SSLHostInfo for the given hostname 145 // GetForHost returns a fresh, allocated SSLHostInfo for the given hostname
145 // or NULL on failure. 146 // or NULL on failure.
146 virtual SSLHostInfo* GetForHost(const std::string& hostname, 147 virtual SSLHostInfo* GetForHost(const std::string& hostname,
147 const SSLConfig& ssl_config) = 0; 148 const SSLConfig& ssl_config) = 0;
148 }; 149 };
149 150
150 } // namespace net 151 } // namespace net
151 152
152 #endif // NET_SOCKET_SSL_HOST_INFO_H_ 153 #endif // NET_SOCKET_SSL_HOST_INFO_H_
OLDNEW
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698