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

Unified Diff: chrome/browser/notifications/sync_notifier/synced_notification.h

Issue 193773003: Turn on and use the AppInfo data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Turn on app info: fix windows build Created 6 years, 9 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
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);
};

Powered by Google App Engine
This is Rietveld 408576698