OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/disk_cache/mem_rankings.h" | 5 #include "net/disk_cache/memory/mem_rankings.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/disk_cache/mem_entry_impl.h" | 8 #include "net/disk_cache/memory/mem_entry_impl.h" |
9 | 9 |
10 namespace disk_cache { | 10 namespace disk_cache { |
11 | 11 |
12 MemRankings::~MemRankings() { | 12 MemRankings::~MemRankings() { |
13 DCHECK(!head_ && !tail_); | 13 DCHECK(!head_ && !tail_); |
14 } | 14 } |
15 | 15 |
16 void MemRankings::Insert(MemEntryImpl* node) { | 16 void MemRankings::Insert(MemEntryImpl* node) { |
17 if (head_) | 17 if (head_) |
18 head_->set_prev(node); | 18 head_->set_prev(node); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 58 } |
59 | 59 |
60 MemEntryImpl* MemRankings::GetPrev(MemEntryImpl* node) { | 60 MemEntryImpl* MemRankings::GetPrev(MemEntryImpl* node) { |
61 if (!node) | 61 if (!node) |
62 return tail_; | 62 return tail_; |
63 | 63 |
64 return node->prev(); | 64 return node->prev(); |
65 } | 65 } |
66 | 66 |
67 } // namespace disk_cache | 67 } // namespace disk_cache |
OLD | NEW |