Close the notification after user clicks cancel button in message center (2nd try)
commit60e3c1013c9a3bdd1c078db3f7d140e4ea5f2882
authoryoshiki <yoshiki@chromium.org>
Fri, 8 May 2015 00:21:26 +0000 (7 17:21 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 8 May 2015 00:21:52 +0000 (8 00:21 +0000)
tree5f477cbe2454130f9f2e65e31bdca911f5ad01fa
parent583115d08a154a9ef2cc13dceaeece3ef7f7bca3
Close the notification after user clicks cancel button in message center (2nd try)

When the message center opens, NotificationUIManager::CancelById method doesn't close the notification. We need to call MessageCenter::RemoveNotification in addition.

The use-after-free on the previous patch has been fixed in this patch.

BUG=481078
TEST=manually tested, added test succees
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_chromium_chromeos_msan_rel_ng

Review URL: https://codereview.chromium.org/1135503002

Cr-Commit-Position: refs/heads/master@{#328886}
chrome/browser/download/notification/download_notification_browsertest.cc
chrome/browser/download/notification/download_notification_item.cc
chrome/browser/download/notification/download_notification_item.h