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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 10837215: exhibit 1: explicit null checks Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
Index: chrome/browser/ui/content_settings/content_setting_bubble_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index b3cce9f507a566dc3650bb31a3ceeae632527dfa..a7829df1234b66c94feffe94fe0020762e4544fc 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -469,7 +469,8 @@ void ContentSettingPopupBubbleModel::SetPopups() {
PopupItem popup_item;
popup_item.title = title;
// TODO: Make this use gfx::Image.
- popup_item.bitmap = (*i)->favicon_tab_helper()->GetFavicon().AsBitmap();
+ const gfx::Image& icon = (*i)->favicon_tab_helper()->GetFavicon();
+ popup_item.bitmap = icon.IsEmpty() ? SkBitmap() : *icon.ToSkBitmap();
popup_item.tab_contents = (*i);
add_popup(popup_item);
}
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm ('k') | chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698