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

Unified Diff: net/disk_cache/memory/mem_rankings.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months 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/disk_cache/memory/mem_rankings.h ('k') | net/disk_cache/net_log_parameters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/memory/mem_rankings.cc
diff --git a/net/disk_cache/memory/mem_rankings.cc b/net/disk_cache/memory/mem_rankings.cc
deleted file mode 100644
index ba5e00b9938be26194e300135b1e7c443291f851..0000000000000000000000000000000000000000
--- a/net/disk_cache/memory/mem_rankings.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2006-2008 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.
-
-#include "net/disk_cache/memory/mem_rankings.h"
-
-#include "base/logging.h"
-#include "net/disk_cache/memory/mem_entry_impl.h"
-
-namespace disk_cache {
-
-MemRankings::~MemRankings() {
- DCHECK(!head_ && !tail_);
-}
-
-void MemRankings::Insert(MemEntryImpl* node) {
- if (head_)
- head_->set_prev(node);
-
- if (!tail_)
- tail_ = node;
-
- node->set_prev(NULL);
- node->set_next(head_);
- head_ = node;
-}
-
-void MemRankings::Remove(MemEntryImpl* node) {
- MemEntryImpl* prev = node->prev();
- MemEntryImpl* next = node->next();
-
- if (head_ == node)
- head_ = next;
-
- if (tail_ == node)
- tail_ = prev;
-
- if (prev)
- prev->set_next(next);
-
- if (next)
- next->set_prev(prev);
-
- node->set_next(NULL);
- node->set_prev(NULL);
-}
-
-void MemRankings::UpdateRank(MemEntryImpl* node) {
- Remove(node);
- Insert(node);
-}
-
-MemEntryImpl* MemRankings::GetNext(MemEntryImpl* node) {
- if (!node)
- return head_;
-
- return node->next();
-}
-
-MemEntryImpl* MemRankings::GetPrev(MemEntryImpl* node) {
- if (!node)
- return tail_;
-
- return node->prev();
-}
-
-} // namespace disk_cache
« no previous file with comments | « net/disk_cache/memory/mem_rankings.h ('k') | net/disk_cache/net_log_parameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698