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

Unified Diff: chrome/browser/android/thumbnail/thumbnail_cache.cc

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 years, 4 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 | « no previous file | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/thumbnail/thumbnail_cache.cc
diff --git a/chrome/browser/android/thumbnail/thumbnail_cache.cc b/chrome/browser/android/thumbnail/thumbnail_cache.cc
index 295d7fbf9e731628b8f8acff7b811be57c866759..307bbe382983e3f57b8e360b8947001577c54a96 100644
--- a/chrome/browser/android/thumbnail/thumbnail_cache.cc
+++ b/chrome/browser/android/thumbnail/thumbnail_cache.cc
@@ -205,9 +205,8 @@ Thumbnail* ThumbnailCache::Get(TabId tab_id,
return thumbnail;
}
- if (force_disk_read &&
- ContainsValue(visible_ids_, tab_id) &&
- !ContainsValue(read_queue_, tab_id)) {
+ if (force_disk_read && base::ContainsValue(visible_ids_, tab_id) &&
+ !base::ContainsValue(read_queue_, tab_id)) {
read_queue_.push_back(tab_id);
ReadNextThumbnail();
}
@@ -295,8 +294,7 @@ void ThumbnailCache::UpdateVisibleIds(const TabIdList& priority) {
while (iter != priority.end() && count < ids_size) {
TabId tab_id = *iter;
visible_ids_.push_back(tab_id);
- if (!cache_.Get(tab_id) &&
- !ContainsValue(read_queue_, tab_id))
+ if (!cache_.Get(tab_id) && !base::ContainsValue(read_queue_, tab_id))
read_queue_.push_back(tab_id);
iter++;
count++;
@@ -403,8 +401,7 @@ void ThumbnailCache::ReadNextThumbnail() {
}
void ThumbnailCache::MakeSpaceForNewItemIfNecessary(TabId tab_id) {
- if (cache_.Get(tab_id) ||
- !ContainsValue(visible_ids_, tab_id) ||
+ if (cache_.Get(tab_id) || !base::ContainsValue(visible_ids_, tab_id) ||
cache_.size() < cache_.MaximumCacheSize()) {
return;
}
@@ -416,7 +413,7 @@ void ThumbnailCache::MakeSpaceForNewItemIfNecessary(TabId tab_id) {
for (ExpiringThumbnailCache::iterator iter = cache_.begin();
iter != cache_.end();
iter++) {
- if (!ContainsValue(visible_ids_, iter->first)) {
+ if (!base::ContainsValue(visible_ids_, iter->first)) {
key_to_remove = iter->first;
found_key_to_remove = true;
break;
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698