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

Unified Diff: net/http/mock_http_cache.cc

Issue 8670009: SSL Host info: Make sure that we can update certificate chains in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/mock_http_cache.cc
===================================================================
--- net/http/mock_http_cache.cc (revision 111217)
+++ net/http/mock_http_cache.cc (working copy)
@@ -341,7 +341,7 @@
MockDiskCache::MockDiskCache()
: open_count_(0), create_count_(0), fail_requests_(false),
- soft_failures_(false) {
+ soft_failures_(false), double_create_check_(true) {
}
MockDiskCache::~MockDiskCache() {
@@ -392,7 +392,12 @@
EntryMap::iterator it = entries_.find(key);
if (it != entries_.end()) {
- DCHECK(it->second->is_doomed());
+ if (!it->second->is_doomed()) {
+ if (double_create_check_)
+ NOTREACHED();
+ else
+ return net::ERR_CACHE_CREATE_FAILURE;
+ }
it->second->Release();
entries_.erase(it);
}
« no previous file with comments | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698