summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r--net/http/http_cache.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index cf1cd43..41e5436 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -582,6 +582,17 @@ std::string HttpCache::GenerateCacheKey(const HttpRequestInfo* request) {
return result;
}
+void HttpCache::DoomActiveEntry(const std::string& key) {
+ ActiveEntriesMap::iterator it = active_entries_.find(key);
+ if (it == active_entries_.end())
+ return;
+
+ // This is not a performance critical operation, this is handling an error
+ // condition so it is OK to look up the entry again.
+ int rv = DoomEntry(key, NULL);
+ DCHECK_EQ(OK, rv);
+}
+
int HttpCache::DoomEntry(const std::string& key, Transaction* trans) {
// Need to abandon the ActiveEntry, but any transaction attached to the entry
// should not be impacted. Dooming an entry only means that it will no