| Index: chrome/browser/extensions/api/notifications/notifications_api.cc
|
| diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc
|
| index 2e6d46f6a35c6c78d411888a2b758d96f582e3d8..63d529fe4f31986b149b025fcd84559da7e25723 100644
|
| --- a/chrome/browser/extensions/api/notifications/notifications_api.cc
|
| +++ b/chrome/browser/extensions/api/notifications/notifications_api.cc
|
| @@ -288,6 +288,16 @@ bool NotificationsApiFunction::CreateNotification(
|
|
|
| // Then, handle any optional data that's been provided.
|
| message_center::RichNotificationData optional_fields;
|
| + if (options->small_icon_url.get()) {
|
| + if (!NotificationBitmapToGfxImage(image_scale,
|
| + bitmap_sizes.small_icon_size,
|
| + options->small_icon_bitmap.get(),
|
| + &optional_fields.small_image)) {
|
| + SetError(kUnableToDecodeIconError);
|
| + return false;
|
| + }
|
| + }
|
| +
|
| if (options->priority.get())
|
| optional_fields.priority = *options->priority;
|
|
|
| @@ -405,6 +415,14 @@ bool NotificationsApiFunction::UpdateNotification(
|
| notification->set_icon(icon);
|
| }
|
|
|
| + gfx::Image small_icon;
|
| + if (NotificationBitmapToGfxImage(image_scale,
|
| + bitmap_sizes.small_icon_size,
|
| + options->small_icon_bitmap.get(),
|
| + &small_icon)) {
|
| + notification->set_small_image(small_icon);
|
| + }
|
| +
|
| if (options->priority)
|
| notification->set_priority(*options->priority);
|
|
|
|
|