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

Side by Side Diff: chrome/renderer/instant_restricted_id_cache.h

Issue 684973003: Cleanup: Move InstantRestrictedIDCache from chrome/common to chrome/renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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 | « chrome/renderer/OWNERS ('k') | chrome/renderer/instant_restricted_id_cache_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 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
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_
OLDNEW
« no previous file with comments | « chrome/renderer/OWNERS ('k') | chrome/renderer/instant_restricted_id_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698