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

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: I Really hate this warning! 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
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;
wtc 2011/11/30 00:22:09 Nit: add curly braces?
rvargas (doing something else) 2011/11/30 01:05:24 Sorry, I missed this comment. Before I change it,
wtc 2011/11/30 01:36:40 You can ignore this change request. When I first
+ }
it->second->Release();
entries_.erase(it);
}
« net/http/disk_cache_based_ssl_host_info_unittest.cc ('K') | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698