diff options
-rw-r--r-- | net/http/http_cache.cc | 7 | ||||
-rw-r--r-- | net/http/http_cache.h | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc index eca95ef..d4a869f 100644 --- a/net/http/http_cache.cc +++ b/net/http/http_cache.cc @@ -601,11 +601,10 @@ HttpCache::ActiveEntry* HttpCache::FindActiveEntry(const std::string& key) { } HttpCache::ActiveEntry* HttpCache::ActivateEntry( - const std::string& key, disk_cache::Entry* disk_entry) { - DCHECK(!FindActiveEntry(key)); + DCHECK(!FindActiveEntry(disk_entry->GetKey())); ActiveEntry* entry = new ActiveEntry(disk_entry); - active_entries_[key] = entry; + active_entries_[disk_entry->GetKey()] = entry; return entry; } @@ -990,7 +989,7 @@ void HttpCache::OnIOComplete(int result, PendingOp* pending_op) { fail_requests = true; } else if (item->IsValid()) { key = pending_op->disk_entry->GetKey(); - entry = ActivateEntry(key, pending_op->disk_entry); + entry = ActivateEntry(pending_op->disk_entry); } else { // The writer transaction is gone. if (op == WI_CREATE_ENTRY) diff --git a/net/http/http_cache.h b/net/http/http_cache.h index 255d7b6..0ce22e5 100644 --- a/net/http/http_cache.h +++ b/net/http/http_cache.h @@ -257,10 +257,8 @@ class HttpCache : public HttpTransactionFactory, ActiveEntry* FindActiveEntry(const std::string& key); // Creates a new ActiveEntry and starts tracking it. |disk_entry| is the disk - // cache entry that corresponds to the desired |key|. - // TODO(rvargas): remove the |key| argument. - ActiveEntry* ActivateEntry(const std::string& key, - disk_cache::Entry* disk_entry); + // cache entry. + ActiveEntry* ActivateEntry(disk_cache::Entry* disk_entry); // Deletes an ActiveEntry. void DeactivateEntry(ActiveEntry* entry); |