From 8c9d4ba6af47099c5ce030d0802b276cd8fd37b2 Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Mon, 18 Oct 2010 13:45:12 +0000 Subject: Revert 62918 - net: clean up SSLHostInfo construction. Create an SSLHostInfoFactory interface and plumb it from the HttpCache to the SSLConnectJob. Also, move the SSLHostInfo reference from the ssl_config to being passed to the SSLClientSocket. BUG=none TEST=net_unittests Review URL: http://codereview.chromium.org/3747003 TBR=agl@chromium.org Review URL: http://codereview.chromium.org/3846005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62922 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/ssl_config_service.h | 6 ++++++ net/base/ssl_host_info.cc | 13 ------------- net/base/ssl_host_info.h | 16 +++++----------- 3 files changed, 11 insertions(+), 24 deletions(-) delete mode 100644 net/base/ssl_host_info.cc (limited to 'net/base') diff --git a/net/base/ssl_config_service.h b/net/base/ssl_config_service.h index dc48a36..b1d1de4 100644 --- a/net/base/ssl_config_service.h +++ b/net/base/ssl_config_service.h @@ -77,6 +77,12 @@ struct SSLConfig { std::string next_protos; scoped_refptr 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 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 deleted file mode 100644 index 4b6c0e2..0000000 --- a/net/base/ssl_host_info.cc +++ /dev/null @@ -1,13 +0,0 @@ -// 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 ae9ac6a..77c40fb 100644 --- a/net/base/ssl_host_info.h +++ b/net/base/ssl_host_info.h @@ -15,10 +15,9 @@ 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 { +class SSLHostInfo : + public base::RefCountedThreadSafe { 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. @@ -46,15 +45,10 @@ 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(); - // GetForHost returns a fresh, allocated SSLHostInfo for the given hostname - // or NULL on failure. - virtual SSLHostInfo* GetForHost(const std::string& hostname) = 0; + protected: + friend class base::RefCountedThreadSafe; + virtual ~SSLHostInfo() { } }; } // namespace net -- cgit v1.1