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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_icon_source.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/extensions/extension_icon_source.h" 5 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 if (icon.relative_path().empty()) { 141 if (icon.relative_path().empty()) {
142 LoadIconFailed(next_id); 142 LoadIconFailed(next_id);
143 } else { 143 } else {
144 LoadExtensionImage(icon, next_id); 144 LoadExtensionImage(icon, next_id);
145 } 145 }
146 } 146 }
147 147
148 ExtensionIconSource::~ExtensionIconSource() { 148 ExtensionIconSource::~ExtensionIconSource() {
149 // Clean up all the temporary data we're holding for requests. 149 // Clean up all the temporary data we're holding for requests.
150 STLDeleteValues(&request_map_); 150 base::STLDeleteValues(&request_map_);
151 } 151 }
152 152
153 const SkBitmap* ExtensionIconSource::GetDefaultAppImage() { 153 const SkBitmap* ExtensionIconSource::GetDefaultAppImage() {
154 if (!default_app_data_.get()) 154 if (!default_app_data_.get())
155 default_app_data_.reset(LoadImageByResourceId(IDR_APP_DEFAULT_ICON)); 155 default_app_data_.reset(LoadImageByResourceId(IDR_APP_DEFAULT_ICON));
156 156
157 return default_app_data_.get(); 157 return default_app_data_.get();
158 } 158 }
159 159
160 const SkBitmap* ExtensionIconSource::GetDefaultExtensionImage() { 160 const SkBitmap* ExtensionIconSource::GetDefaultExtensionImage() {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 std::map<int, ExtensionIconRequest*>::iterator i = 343 std::map<int, ExtensionIconRequest*>::iterator i =
344 request_map_.find(request_id); 344 request_map_.find(request_id);
345 if (i == request_map_.end()) 345 if (i == request_map_.end())
346 return; 346 return;
347 347
348 delete i->second; 348 delete i->second;
349 request_map_.erase(i); 349 request_map_.erase(i);
350 } 350 }
351 351
352 } // namespace extensions 352 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/cookies_tree_model_util.cc ('k') | chrome/browser/ui/webui/inspect_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698