Index: chrome/browser/notifications/sync_notifier/synced_notification.h |
diff --git a/chrome/browser/notifications/sync_notifier/synced_notification.h b/chrome/browser/notifications/sync_notifier/synced_notification.h |
index 429ecc66e850647f8752e0ee80d46ca183de8b78..b050b9cf49f9397fcaa7a732f17e785ef6e83cec 100644 |
--- a/chrome/browser/notifications/sync_notifier/synced_notification.h |
+++ b/chrome/browser/notifications/sync_notifier/synced_notification.h |
@@ -74,7 +74,6 @@ class SyncedNotification : public chrome::BitmapFetcherDelegate { |
size_t GetButtonCount() const; |
std::string GetContainedNotificationTitle(int index) const; |
std::string GetContainedNotificationMessage(int index) const; |
- std::string GetSendingServiceId() const; |
const gfx::Image& GetAppIcon() const; |
// Use this to prevent toasting a notification. |
@@ -99,6 +98,18 @@ class SyncedNotification : public chrome::BitmapFetcherDelegate { |
ChromeNotifierService* notifier_service, |
Profile* profile); |
+ // Display the notification if it has the specified app_id_name. |
+ void ShowIfNewlyEnabled(NotificationUIManager* notification_manager, |
dewittj
2014/03/17 21:43:43
Can you explain why you sometimes use the stored N
Pete Williamson
2014/03/21 01:22:31
It was to make the code easier to test by putting
|
+ ChromeNotifierService* notifier_service, |
dewittj
2014/03/17 21:43:43
Same.
Pete Williamson
2014/03/21 01:22:31
Done.
|
+ Profile* profile, |
+ std::string app_id_name); |
+ |
+ // Remove the notification if it has the specified app_id_name. |
+ void HideIfNewlyRemoved(NotificationUIManager* notification_manager, |
dewittj
2014/03/17 21:43:43
Wouldn't this be better named HideAllForAppID?
Pete Williamson
2014/03/21 01:22:31
Done (also renamed ShowIfNewlyEnabled -> ShowAllFo
|
+ ChromeNotifierService* notifier_service, |
dewittj
2014/03/17 21:43:43
Argument unused, please remove.
Pete Williamson
2014/03/21 01:22:31
Done.
|
+ Profile* profile, |
dewittj
2014/03/17 21:43:43
Same.
Pete Williamson
2014/03/21 01:22:31
Done.
|
+ std::string app_id_name); |
+ |
// This gets a pointer to the SyncedNotificationSpecifics part |
// of the sync data. |
sync_pb::EntitySpecifics GetEntitySpecifics() const; |
@@ -134,13 +145,14 @@ class SyncedNotification : public chrome::BitmapFetcherDelegate { |
bool image_bitmap_fetch_pending_; |
std::vector<bool> button_bitmaps_fetch_pending_; |
- |
friend class SyncedNotificationTest; |
FRIEND_TEST_ALL_PREFIXES(SyncedNotificationTest, AddBitmapToFetchQueueTest); |
FRIEND_TEST_ALL_PREFIXES(SyncedNotificationTest, OnFetchCompleteTest); |
FRIEND_TEST_ALL_PREFIXES(SyncedNotificationTest, QueueBitmapFetchJobsTest); |
FRIEND_TEST_ALL_PREFIXES(SyncedNotificationTest, EmptyBitmapTest); |
+ FRIEND_TEST_ALL_PREFIXES(SyncedNotificationTest, ShowIfNewlyEnabledTest); |
+ FRIEND_TEST_ALL_PREFIXES(SyncedNotificationTest, HideIfNewlyRemovedTest); |
DISALLOW_COPY_AND_ASSIGN(SyncedNotification); |
}; |