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

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

Issue 3846005: Revert 62918 - net: clean up SSLHostInfo construction.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 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/base/ssl_host_info.cc ('k') | net/http/http_cache.h » ('j') | 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) 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"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 void DiskCacheBasedSSLHostInfo::Start() { 29 void DiskCacheBasedSSLHostInfo::Start() {
30 DCHECK(CalledOnValidThread()); 30 DCHECK(CalledOnValidThread());
31 DCHECK_EQ(GET_BACKEND, state_); 31 DCHECK_EQ(GET_BACKEND, state_);
32 DoLoop(OK); 32 DoLoop(OK);
33 } 33 }
34 34
35 DiskCacheBasedSSLHostInfo::~DiskCacheBasedSSLHostInfo() { 35 DiskCacheBasedSSLHostInfo::~DiskCacheBasedSSLHostInfo() {
36 DCHECK(!user_callback_); 36 DCHECK(!user_callback_);
37 if (entry_) 37 DCHECK(!entry_);
38 entry_->Close();
39 callback_->Cancel(); 38 callback_->Cancel();
40 } 39 }
41 40
42 std::string DiskCacheBasedSSLHostInfo::key() const { 41 std::string DiskCacheBasedSSLHostInfo::key() const {
43 return "sslhostinfo:" + hostname_; 42 return "sslhostinfo:" + hostname_;
44 } 43 }
45 44
46 void DiskCacheBasedSSLHostInfo::DoLoop(int rv) { 45 void DiskCacheBasedSSLHostInfo::DoLoop(int rv) {
47 do { 46 do {
48 switch (state_) { 47 switch (state_) {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 221
223 int DiskCacheBasedSSLHostInfo::SetDone() { 222 int DiskCacheBasedSSLHostInfo::SetDone() {
224 if (entry_) 223 if (entry_)
225 entry_->Close(); 224 entry_->Close();
226 entry_ = NULL; 225 entry_ = NULL;
227 state_ = NONE; 226 state_ = NONE;
228 return OK; 227 return OK;
229 } 228 }
230 229
231 } // namespace net 230 } // namespace net
OLDNEW
« no previous file with comments | « net/base/ssl_host_info.cc ('k') | net/http/http_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698