summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 13:33:21 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 13:33:21 +0000
commit7ab5bbd128a32d32046201df76b86d370efa65af (patch)
tree69a234c16498a3a27acacc2c4681f783c4bd0975 /net/base
parent0a0d806aa4c534ff999f6bac2503d76d1d38e38d (diff)
downloadchromium_src-7ab5bbd128a32d32046201df76b86d370efa65af.zip
chromium_src-7ab5bbd128a32d32046201df76b86d370efa65af.tar.gz
chromium_src-7ab5bbd128a32d32046201df76b86d370efa65af.tar.bz2
Revert revert 62918 - net: clean up SSLHostInfo construction."
Was reverted in r62922 due to a change landing between the try run and the commit. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63046 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/ssl_config_service.h6
-rw-r--r--net/base/ssl_host_info.cc13
-rw-r--r--net/base/ssl_host_info.h16
3 files changed, 24 insertions, 11 deletions
diff --git a/net/base/ssl_config_service.h b/net/base/ssl_config_service.h
index b1d1de4..dc48a36 100644
--- a/net/base/ssl_config_service.h
+++ b/net/base/ssl_config_service.h
@@ -77,12 +77,6 @@ struct SSLConfig {
std::string next_protos;
scoped_refptr<X509Certificate> client_cert;
-
- // ssl_host_info contains an optional context that is needed for Snap Start.
- // If provided, the SSL socket will assume that the application protocol is
- // client-speaks-first. Also needs SSLConfigService::EnableSnapStart to
- // have been called.
- scoped_refptr<SSLHostInfo> ssl_host_info;
};
// The interface for retrieving the SSL configuration. This interface
diff --git a/net/base/ssl_host_info.cc b/net/base/ssl_host_info.cc
new file mode 100644
index 0000000..4b6c0e2
--- /dev/null
+++ b/net/base/ssl_host_info.cc
@@ -0,0 +1,13 @@
+// Copyright (c) 2010 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.
+
+#include "net/base/ssl_host_info.h"
+
+namespace net {
+
+SSLHostInfo::~SSLHostInfo() {}
+
+SSLHostInfoFactory::~SSLHostInfoFactory() {}
+
+} // namespace net
diff --git a/net/base/ssl_host_info.h b/net/base/ssl_host_info.h
index 77c40fb..ae9ac6a 100644
--- a/net/base/ssl_host_info.h
+++ b/net/base/ssl_host_info.h
@@ -15,9 +15,10 @@ namespace net {
// This information may be stored on disk so does not include keys or session
// information etc. Primarily it's intended for caching the server's
// certificates.
-class SSLHostInfo :
- public base::RefCountedThreadSafe<SSLHostInfo> {
+class SSLHostInfo {
public:
+ virtual ~SSLHostInfo();
+
// Start will commence the lookup. This must be called before any other
// methods. By opportunistically calling this early, it may be possible to
// overlap this object's lookup and reduce latency.
@@ -45,10 +46,15 @@ class SSLHostInfo :
// this object and the store operation will still complete. This can only be
// called once WaitForDataReady has returned OK or called its callback.
virtual void Set(const std::string& new_data) = 0;
+};
+
+class SSLHostInfoFactory {
+ public:
+ virtual ~SSLHostInfoFactory();
- protected:
- friend class base::RefCountedThreadSafe<SSLHostInfo>;
- virtual ~SSLHostInfo() { }
+ // GetForHost returns a fresh, allocated SSLHostInfo for the given hostname
+ // or NULL on failure.
+ virtual SSLHostInfo* GetForHost(const std::string& hostname) = 0;
};
} // namespace net