Index: net/http/disk_cache_based_ssl_host_info.cc |
=================================================================== |
--- net/http/disk_cache_based_ssl_host_info.cc (revision 111204) |
+++ net/http/disk_cache_based_ssl_host_info.cc (working copy) |
@@ -44,6 +44,7 @@ |
&DiskCacheBasedSSLHostInfo::OnIOComplete)), |
state_(GET_BACKEND), |
ready_(false), |
+ found_entry_(false), |
hostname_(hostname), |
http_cache_(http_cache), |
backend_(NULL), |
@@ -82,7 +83,7 @@ |
if (!backend_) |
return; |
- state_ = CREATE; |
+ state_ = found_entry_ ? OPEN : CREATE; |
DoLoop(OK); |
} |
@@ -167,9 +168,15 @@ |
} |
int DiskCacheBasedSSLHostInfo::DoOpenComplete(int rv) { |
+ if (found_entry_) { |
+ state_ = CREATE_COMPLETE; |
+ return rv; |
+ } |
wtc
2011/11/30 00:22:09
Instead of checking found_entry_ here, I suggest w
|
+ |
if (rv == OK) { |
entry_ = callback_->entry(); |
state_ = READ; |
+ found_entry_ = true; |
} else { |
state_ = WAIT_FOR_DATA_READY_DONE; |
} |