diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-23 04:14:20 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-23 04:14:20 +0000 |
commit | 3c24a4682e05dc4496c0a9d898872ac39d142817 (patch) | |
tree | 1f4a2209077c42f38ee2f6f46ed670221d00f13f /net | |
parent | bd25f1d16e9f9c8f94a6e761719d7239028447c8 (diff) | |
download | chromium_src-3c24a4682e05dc4496c0a9d898872ac39d142817.zip chromium_src-3c24a4682e05dc4496c0a9d898872ac39d142817.tar.gz chromium_src-3c24a4682e05dc4496c0a9d898872ac39d142817.tar.bz2 |
net: Remove key argument from ActivateEntry function.
(Note: This was a TODO for rvargas).
BUG=None
TEST=locally
Review URL: http://codereview.chromium.org/3847003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-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); |