Index: chrome/browser/notifications/notification_conversion_helper.cc |
diff --git a/chrome/browser/notifications/notification_conversion_helper.cc b/chrome/browser/notifications/notification_conversion_helper.cc |
index 4434af17bedbf677f4c0aa2da6223e3d6ebb0988..b0eec8322be26b339c7c1fb9089b26c4d3258096 100644 |
--- a/chrome/browser/notifications/notification_conversion_helper.cc |
+++ b/chrome/browser/notifications/notification_conversion_helper.cc |
@@ -142,25 +142,23 @@ void NotificationConversionHelper::GfxImageToNotificationBitmap( |
bool NotificationConversionHelper::NotificationBitmapToGfxImage( |
float max_scale, |
const gfx::Size& target_size_dips, |
- extensions::api::notifications::NotificationBitmap* notification_bitmap, |
+ const extensions::api::notifications::NotificationBitmap& |
+ notification_bitmap, |
gfx::Image* return_image) { |
- if (!notification_bitmap) |
- return false; |
- |
const int max_device_pixel_width = target_size_dips.width() * max_scale; |
const int max_device_pixel_height = target_size_dips.height() * max_scale; |
const int BYTES_PER_PIXEL = 4; |
- const int width = notification_bitmap->width; |
- const int height = notification_bitmap->height; |
+ const int width = notification_bitmap.width; |
+ const int height = notification_bitmap.height; |
if (width < 0 || height < 0 || width > max_device_pixel_width || |
height > max_device_pixel_height) |
return false; |
// Ensure we have rgba data. |
- std::vector<char>* rgba_data = notification_bitmap->data.get(); |
+ std::vector<char>* rgba_data = notification_bitmap.data.get(); |
if (!rgba_data) |
return false; |