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

Side by Side Diff: media/blink/lru.h

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « media/blink/key_system_config_selector_unittest.cc ('k') | media/blink/lru_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef MEDIA_BLINK_LRU_H_ 5 #ifndef MEDIA_BLINK_LRU_H_
6 #define MEDIA_BLINK_LRU_H_ 6 #define MEDIA_BLINK_LRU_H_
7 7
8 #include <stddef.h>
9
8 #include <list> 10 #include <list>
9 11
10 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 14
13 namespace media { 15 namespace media {
14 16
15 // Simple LRU (least recently used) class. 17 // Simple LRU (least recently used) class.
16 // Keeps track of a set of data and lets you get the least recently used 18 // Keeps track of a set of data and lets you get the least recently used
17 // (oldest) element at any time. All operations are O(1). Elements are expected 19 // (oldest) element at any time. All operations are O(1). Elements are expected
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Maps element values to positions in the list so that we 86 // Maps element values to positions in the list so that we
85 // can quickly remove elements. 87 // can quickly remove elements.
86 base::hash_map<T, typename std::list<T>::iterator> pos_; 88 base::hash_map<T, typename std::list<T>::iterator> pos_;
87 89
88 DISALLOW_COPY_AND_ASSIGN(LRU); 90 DISALLOW_COPY_AND_ASSIGN(LRU);
89 }; 91 };
90 92
91 } // namespace media 93 } // namespace media
92 94
93 #endif // MEDIA_BLINK_LRU_H 95 #endif // MEDIA_BLINK_LRU_H
OLDNEW
« no previous file with comments | « media/blink/key_system_config_selector_unittest.cc ('k') | media/blink/lru_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698