Chromium Code Reviews| Index: chrome/browser/resources/google_now/cards.js |
| diff --git a/chrome/browser/resources/google_now/cards.js b/chrome/browser/resources/google_now/cards.js |
| index 24df10b8354d3e94c4cbd32474a27a94b37af2cb..e1338dfb6ab42224c5ba4908493de4be41751a65 100644 |
| --- a/chrome/browser/resources/google_now/cards.js |
| +++ b/chrome/browser/resources/google_now/cards.js |
| @@ -113,9 +113,9 @@ function buildCardSet() { |
| /** |
| * Creates/updates/deletes a Chrome notification. |
| * @param {ChromeNotificationId} cardId Card ID. |
| - * @param {?ReceivedNotification} receivedNotification Google Now card |
| - * represented as a set of parameters for showing a Chrome notification, |
| - * or null if the notification needs to be deleted. |
| + * @param {(ReceivedNotification|undefined)} receivedNotification Google Now |
| + * card represented as a set of parameters for showing a Chrome |
| + * notification, or null if the notification needs to be deleted. |
| * @param {function(ReceivedNotification)=} onCardShown Optional parameter |
| * called when each card is shown. |
| */ |
| @@ -196,7 +196,7 @@ function buildCardSet() { |
| chrome.alarms.clear(alarmPrefix + cardId); |
| var now = Date.now(); |
| /** @type {?UncombinedNotification} */ |
|
rgustafson
2014/01/07 20:36:45
|undefined rather than ?nullable
vadimt
2014/01/08 02:19:01
Done.
|
| - var winningCard = null; |
| + var winningCard = undefined; |
| // Next moment of time when winning notification selection algotithm can |
| // potentially return a different notification. |
| /** @type {?number} */ |
| @@ -243,7 +243,7 @@ function buildCardSet() { |
| // otherwise notifications data with 2 pointers to the same object won't |
| // be stored correctly to chrome.storage. |
| var winningActionUrls = winningCard && |
| - (winningCard.receivedNotification.actionUrls || null) && |
| + winningCard.receivedNotification.actionUrls && |
| JSON.parse(JSON.stringify( |
| winningCard.receivedNotification.actionUrls)); |