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

Unified Diff: chrome/renderer/resources/extensions/notifications_custom_bindings.js

Issue 20136004: Allow partial update for notification update API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix trybots Created 7 years, 5 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/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..6416978a065a0cbee2ca51d12d9a750040f4ce66 100644
--- a/chrome/renderer/resources/extensions/notifications_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/notifications_custom_bindings.js
@@ -22,11 +22,16 @@ 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.
+ // should accept an ImageData object and set the appropriate
+ // field in the output of create.
+
+ // |iconUrl| might be optional for notification updates.
+ if (!notification_details.iconUrl) {
+ callback(true);
dewittj 2013/07/24 23:09:53 What if all they want to update is the image url,
jianli 2013/07/25 01:02:41 Done.
+ return;
+ }
// TODO(dewittj): Try to remove hard-coding of image sizes.
- // |iconUrl| is required.
var url_specs = [{
path: notification_details.iconUrl,
width: 80,

Powered by Google App Engine
This is Rietveld 408576698