| Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| index 433fc9d4d83d0bfde30aa3cfcb4774426a32410d..f1a55e5e788ac9e36c6b91cb08e041501a067580 100644
|
| --- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| +++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| @@ -524,7 +524,7 @@ Gtk2UI::~Gtk2UI() {
|
| ClearAllThemeData();
|
| }
|
|
|
| -gfx::Image Gtk2UI::GetThemeImageNamed(int id) const {
|
| +const gfx::Image& Gtk2UI::GetThemeImageNamed(int id) const {
|
| // Try to get our cached version:
|
| ImageCache::const_iterator it = gtk_images_.find(id);
|
| if (it != gtk_images_.end())
|
| @@ -538,8 +538,8 @@ gfx::Image Gtk2UI::GetThemeImageNamed(int id) const {
|
| image = gfx::Image::CreateFrom1xBitmap(bitmap);
|
| }
|
|
|
| - gtk_images_[id] = image;
|
| - return image;
|
| + auto result = gtk_images_.insert(std::make_pair(id, image));
|
| + return result.first->second;
|
| }
|
|
|
| bool Gtk2UI::GetTint(int id, color_utils::HSL* tint) const {
|
|
|