summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/desktop_notifications_unittest.h
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 00:24:12 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 00:24:12 +0000
commit521b6efb91ea0c7cf11f4fc49c92fc32d8850595 (patch)
treeaf1c68798d74de08ec141b05ad65b1732dfae320 /chrome/browser/notifications/desktop_notifications_unittest.h
parent16b59d5636b47694e846961165c5cd66e1f16976 (diff)
downloadchromium_src-521b6efb91ea0c7cf11f4fc49c92fc32d8850595.zip
chromium_src-521b6efb91ea0c7cf11f4fc49c92fc32d8850595.tar.gz
chromium_src-521b6efb91ea0c7cf11f4fc49c92fc32d8850595.tar.bz2
When an extension is uninstalled, close all desktop notifications from that extension.
This change also refactors the balloon collection code to remove duplication between chrome and chromeos. Removes some gross removal code which was using fake notifications just to get the right ID. BUG=58266 TEST=open notifications from extension, uninstall extensions Review URL: http://codereview.chromium.org/4635007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/desktop_notifications_unittest.h')
-rw-r--r--chrome/browser/notifications/desktop_notifications_unittest.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/chrome/browser/notifications/desktop_notifications_unittest.h b/chrome/browser/notifications/desktop_notifications_unittest.h
index 3b02b7b..9f556e4 100644
--- a/chrome/browser/notifications/desktop_notifications_unittest.h
+++ b/chrome/browser/notifications/desktop_notifications_unittest.h
@@ -22,15 +22,14 @@
#include "testing/gtest/include/gtest/gtest.h"
class DesktopNotificationsTest;
-typedef LoggingNotificationProxyBase<DesktopNotificationsTest>
+typedef LoggingNotificationDelegate<DesktopNotificationsTest>
LoggingNotificationProxy;
// Test version of the balloon collection which counts the number
// of notifications that are added to it.
class MockBalloonCollection : public BalloonCollectionImpl {
public:
- MockBalloonCollection() :
- log_proxy_(new LoggingNotificationProxy()) {}
+ MockBalloonCollection() {}
// Our mock collection has an area large enough for a fixed number
// of balloons.
@@ -40,7 +39,6 @@ class MockBalloonCollection : public BalloonCollectionImpl {
// BalloonCollectionImpl overrides
virtual void Add(const Notification& notification,
Profile* profile);
- virtual bool Remove(const Notification& notification);
virtual bool HasSpace() const { return count() < kMockBalloonSpace; }
virtual Balloon* MakeBalloon(const Notification& notification,
Profile* profile);
@@ -63,7 +61,6 @@ class MockBalloonCollection : public BalloonCollectionImpl {
private:
std::deque<Balloon*> balloons_;
- scoped_refptr<LoggingNotificationProxy> log_proxy_;
};
class DesktopNotificationsTest : public testing::Test {