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

Unified Diff: chrome/browser/resources/google_now/background.js

Issue 25097002: Cleaning data associated with the card upon deletion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing missing argument. Created 7 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/resources/google_now/cards.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/google_now/background.js
diff --git a/chrome/browser/resources/google_now/background.js b/chrome/browser/resources/google_now/background.js
index 5a6e6aeae5f7a0b3a7e2a93106ade2ba06f81ee8..e6e32192bf36a102fe0bbf308888aaf1aa7938db 100644
--- a/chrome/browser/resources/google_now/background.js
+++ b/chrome/browser/resources/google_now/background.js
@@ -299,7 +299,7 @@ function showNotificationCards(cards) {
if (!(chromeNotificationId in cards)) {
console.log(
'showNotificationCards-delete ' + chromeNotificationId);
- cardSet.clear(chromeNotificationId);
+ cardSet.clear(chromeNotificationId, false);
}
}
@@ -815,15 +815,16 @@ function onNotificationClosed(chromeNotificationId, byUser) {
tasks.add(DISMISS_CARD_TASK_NAME, function() {
dismissalAttempts.start();
- // Deleting the notification in case it was re-added while this task was
- // scheduled, waiting for execution.
- cardSet.clear(chromeNotificationId);
-
instrumented.storage.local.get(
['pendingDismissals', 'notificationsData'], function(items) {
items.pendingDismissals = items.pendingDismissals || [];
items.notificationsData = items.notificationsData || {};
+ // Deleting the notification in case it was re-added while this task was
+ // scheduled, waiting for execution; also cleaning notification's data
+ // from storage.
+ cardSet.clear(chromeNotificationId, true);
+
var notificationData = items.notificationsData[chromeNotificationId];
if (notificationData && notificationData.dismissals) {
« no previous file with comments | « no previous file | chrome/browser/resources/google_now/cards.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698