OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_COMMON_INSTANT_RESTRICTED_ID_CACHE_H_ | 5 #ifndef CHROME_RENDERER_INSTANT_RESTRICTED_ID_CACHE_H_ |
6 #define CHROME_COMMON_INSTANT_RESTRICTED_ID_CACHE_H_ | 6 #define CHROME_RENDERER_INSTANT_RESTRICTED_ID_CACHE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/containers/mru_cache.h" | 12 #include "base/containers/mru_cache.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "chrome/common/instant_types.h" | 15 #include "chrome/common/instant_types.h" |
16 | 16 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 T* item) const { | 155 T* item) const { |
156 DCHECK(item); | 156 DCHECK(item); |
157 | 157 |
158 typename CacheImpl::const_iterator cache_it = cache_.Peek(restricted_id); | 158 typename CacheImpl::const_iterator cache_it = cache_.Peek(restricted_id); |
159 if (cache_it == cache_.end()) | 159 if (cache_it == cache_.end()) |
160 return false; | 160 return false; |
161 *item = cache_it->second; | 161 *item = cache_it->second; |
162 return true; | 162 return true; |
163 } | 163 } |
164 | 164 |
165 #endif // CHROME_COMMON_INSTANT_RESTRICTED_ID_CACHE_H_ | 165 #endif // CHROME_RENDERER_INSTANT_RESTRICTED_ID_CACHE_H_ |
OLD | NEW |