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

Side by Side Diff: net/http/disk_cache_based_ssl_host_info.cc

Issue 5386001: Cache certificate verification results in memory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add unit tests. Ready for review. Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "net/http/disk_cache_based_ssl_host_info.h" 5 #include "net/http/disk_cache_based_ssl_host_info.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "net/http/http_cache.h" 11 #include "net/http/http_cache.h"
12 #include "net/http/http_network_session.h"
12 13
13 namespace net { 14 namespace net {
14 15
15 DiskCacheBasedSSLHostInfo::DiskCacheBasedSSLHostInfo( 16 DiskCacheBasedSSLHostInfo::DiskCacheBasedSSLHostInfo(
16 const std::string& hostname, 17 const std::string& hostname,
17 const SSLConfig& ssl_config, 18 const SSLConfig& ssl_config,
18 HttpCache* http_cache) 19 HttpCache* http_cache)
19 : SSLHostInfo(hostname, ssl_config), 20 : SSLHostInfo(hostname, ssl_config,
21 http_cache->network_layer()->GetSession()->cert_verifier()),
willchan no longer on Chromium 2010/12/13 09:30:53 Can we just pass in the CertVerifier explicitly?
20 callback_(new CancelableCompletionCallback<DiskCacheBasedSSLHostInfo>( 22 callback_(new CancelableCompletionCallback<DiskCacheBasedSSLHostInfo>(
21 ALLOW_THIS_IN_INITIALIZER_LIST(this), 23 ALLOW_THIS_IN_INITIALIZER_LIST(this),
22 &DiskCacheBasedSSLHostInfo::DoLoop)), 24 &DiskCacheBasedSSLHostInfo::DoLoop)),
23 state_(GET_BACKEND), 25 state_(GET_BACKEND),
24 ready_(false), 26 ready_(false),
25 hostname_(hostname), 27 hostname_(hostname),
26 http_cache_(http_cache), 28 http_cache_(http_cache),
27 backend_(NULL), 29 backend_(NULL),
28 entry_(NULL), 30 entry_(NULL),
29 user_callback_(NULL) { 31 user_callback_(NULL) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 225
224 int DiskCacheBasedSSLHostInfo::SetDone() { 226 int DiskCacheBasedSSLHostInfo::SetDone() {
225 if (entry_) 227 if (entry_)
226 entry_->Close(); 228 entry_->Close();
227 entry_ = NULL; 229 entry_ = NULL;
228 state_ = NONE; 230 state_ = NONE;
229 return OK; 231 return OK;
230 } 232 }
231 233
232 } // namespace net 234 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698