| Index: chrome/renderer/resources/extensions/notifications_custom_bindings.js
|
| diff --git a/chrome/renderer/resources/extensions/notifications_custom_bindings.js b/chrome/renderer/resources/extensions/notifications_custom_bindings.js
|
| index 5150a4fb1e4b1a8ee3d7a63f052b9e1394c4e216..e56a98bdd37800376a0c970c71b76bd08c406086 100644
|
| --- a/chrome/renderer/resources/extensions/notifications_custom_bindings.js
|
| +++ b/chrome/renderer/resources/extensions/notifications_custom_bindings.js
|
| @@ -22,17 +22,20 @@ function replaceNotificationOptionURLs(notification_details, callback) {
|
| // width: (optional) The maximum width of the image to be downloaded.
|
| // height: (optional) The maximum height of the image to be downloaded.
|
| // callback: A function to be called when the URL is complete. It
|
| - // should accept an ImageData object and set the appropriate
|
| - // field in the output of create.
|
| -
|
| - // TODO(dewittj): Try to remove hard-coding of image sizes.
|
| - // |iconUrl| is required.
|
| - var url_specs = [{
|
| - path: notification_details.iconUrl,
|
| - width: 80,
|
| - height: 80,
|
| - callback: image_data_setter(notification_details, 'iconBitmap')
|
| - }];
|
| + // should accept an ImageData object and set the appropriate
|
| + // field in the output of create.
|
| +
|
| + // TODO(dewittj): Try to remove hard-coding of image sizes.
|
| + // |iconUrl| might be optional for notification updates.
|
| + var url_specs = [];
|
| + if (notification_details.iconUrl) {
|
| + $Array.push(url_specs, {
|
| + path: notification_details.iconUrl,
|
| + width: 80,
|
| + height: 80,
|
| + callback: image_data_setter(notification_details, 'iconBitmap')
|
| + });
|
| + }
|
|
|
| // |imageUrl| is optional.
|
| if (notification_details.imageUrl) {
|
| @@ -57,7 +60,12 @@ function replaceNotificationOptionURLs(notification_details, callback) {
|
| callback: image_data_setter(button_list[i], 'iconBitmap')
|
| });
|
| }
|
| - }
|
| + }
|
| + }
|
| +
|
| + if (!url_specs.length) {
|
| + callback(true);
|
| + return;
|
| }
|
|
|
| var errors = 0;
|
|
|