| OLD | NEW |
| 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()), |
| 20 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 22 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
| 21 callback_(new CallbackImpl(weak_ptr_factory_.GetWeakPtr(), | 23 callback_(new CallbackImpl(weak_ptr_factory_.GetWeakPtr(), |
| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 242 |
| 241 int DiskCacheBasedSSLHostInfo::SetDone() { | 243 int DiskCacheBasedSSLHostInfo::SetDone() { |
| 242 if (entry_) | 244 if (entry_) |
| 243 entry_->Close(); | 245 entry_->Close(); |
| 244 entry_ = NULL; | 246 entry_ = NULL; |
| 245 state_ = NONE; | 247 state_ = NONE; |
| 246 return OK; | 248 return OK; |
| 247 } | 249 } |
| 248 | 250 |
| 249 } // namespace net | 251 } // namespace net |
| OLD | NEW |