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

Unified Diff: ui/gfx/image/image.cc

Issue 10853018: Fall back to the default favicon on invalid favicon files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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: ui/gfx/image/image.cc
diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
index 9854787733b7cf9029de07fec2ffb50081d147b3..9c709dce545519512899d8dc81ac0d8f292807f2 100644
--- a/ui/gfx/image/image.cc
+++ b/ui/gfx/image/image.cc
@@ -342,9 +342,15 @@ SkBitmap Image::AsBitmap() const {
}
ImageSkia Image::AsImageSkia() const {
- return IsEmpty() ? ImageSkia(SkBitmap()) : *ToImageSkia();
+ return IsEmpty() ? ImageSkia() : *ToImageSkia();
}
+#if defined(OS_MACOSX)
+NSImage* Image::AsNSImage() const {
+ return IsEmpty() ? nil : ToNSImage();
+}
+#endif
+
ImageSkia* Image::CopyImageSkia() const {
return new ImageSkia(*ToImageSkia());
}
« chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm ('K') | « ui/gfx/image/image.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698