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

Side by Side Diff: chrome/browser/icon_manager.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/icon_manager.h" 5 #include "chrome/browser/icon_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <tuple> 8 #include <tuple>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 18 matching lines...) Expand all
29 struct IconManager::ClientRequest { 29 struct IconManager::ClientRequest {
30 IconRequestCallback callback; 30 IconRequestCallback callback;
31 base::FilePath file_path; 31 base::FilePath file_path;
32 IconLoader::IconSize size; 32 IconLoader::IconSize size;
33 }; 33 };
34 34
35 IconManager::IconManager() { 35 IconManager::IconManager() {
36 } 36 }
37 37
38 IconManager::~IconManager() { 38 IconManager::~IconManager() {
39 STLDeleteValues(&icon_cache_); 39 base::STLDeleteValues(&icon_cache_);
40 } 40 }
41 41
42 gfx::Image* IconManager::LookupIconFromFilepath(const base::FilePath& file_name, 42 gfx::Image* IconManager::LookupIconFromFilepath(const base::FilePath& file_name,
43 IconLoader::IconSize size) { 43 IconLoader::IconSize size) {
44 GroupMap::iterator it = group_cache_.find(file_name); 44 GroupMap::iterator it = group_cache_.find(file_name);
45 if (it != group_cache_.end()) 45 if (it != group_cache_.end())
46 return LookupIconFromGroup(it->second, size); 46 return LookupIconFromGroup(it->second, size);
47 47
48 return NULL; 48 return NULL;
49 } 49 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 IconManager::CacheKey::CacheKey(const IconGroupID& group, 140 IconManager::CacheKey::CacheKey(const IconGroupID& group,
141 IconLoader::IconSize size) 141 IconLoader::IconSize size)
142 : group(group), 142 : group(group),
143 size(size) { 143 size(size) {
144 } 144 }
145 145
146 bool IconManager::CacheKey::operator<(const CacheKey &other) const { 146 bool IconManager::CacheKey::operator<(const CacheKey &other) const {
147 return std::tie(group, size) < std::tie(other.group, other.size); 147 return std::tie(group, size) < std::tie(other.group, other.size);
148 } 148 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/warning_badge_service.cc ('k') | chrome/browser/importer/ie_importer_browsertest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698