| Index: chrome/browser/ui/views/location_bar/page_action_image_view.cc
|
| diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
|
| index 0d9f5f63a87210e46780680a018cdb86573dcc0d..04440c729f2fb3b906de747cfd8c40b787cfed8d 100644
|
| --- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
|
| @@ -208,9 +208,11 @@ void PageActionImageView::OnImageLoaded(const gfx::Image& image,
|
| // Map the index of the loaded image back to its name. If we ever get an
|
| // index greater than the number of icons, it must be the default icon.
|
| if (index < static_cast<int>(page_action_->icon_paths()->size()))
|
| - page_action_->CacheIcon(page_action_->icon_paths()->at(index), image);
|
| + page_action_->CacheIcon(page_action_->icon_paths()->at(index),
|
| + *image.ToImageSkia());
|
| else
|
| - page_action_->CacheIcon(page_action_->default_icon_path(), image);
|
| + page_action_->CacheIcon(page_action_->default_icon_path(),
|
| + *image.ToImageSkia());
|
|
|
| // During object construction owner_ will be NULL.
|
| TabContents* tab_contents = owner_ ? owner_->GetTabContents() : NULL;
|
| @@ -269,10 +271,9 @@ void PageActionImageView::UpdateVisibility(WebContents* contents,
|
| SetTooltipText(UTF8ToUTF16(tooltip_));
|
|
|
| // Set the image.
|
| - gfx::Image icon = page_action_->GetIcon(current_tab_id_);
|
| - if (!icon.IsEmpty()) {
|
| - SetImage(*icon.ToImageSkia());
|
| - }
|
| + gfx::ImageSkia icon = page_action_->GetIcon(current_tab_id_);
|
| + if (!icon.empty())
|
| + SetImage(icon);
|
|
|
| SetVisible(true);
|
| }
|
|
|