Chromium Code Reviews| 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 b7eb805b0fc244c384ba21d14cc7f9b27ccce1e4..2244fa719b3d627dc3b6e9aec12609e87ffa1c08 100644 |
| --- a/chrome/browser/notifications/sync_notifier/synced_notification.h |
| +++ b/chrome/browser/notifications/sync_notifier/synced_notification.h |
| @@ -38,7 +38,6 @@ class SyncedNotification { |
| // Here are some helper functions to get individual data parts out of a |
| // SyncedNotification. |
| - // TODO(petewil): Add more types as we expand support for the protobuf. |
| std::string title() const; |
| std::string heading() const; |
| std::string description() const; |
| @@ -47,15 +46,27 @@ class SyncedNotification { |
| GURL origin_url() const; |
| GURL app_icon_url() const; |
| GURL image_url() const; |
| - std::string first_external_id() const; |
| - std::string notification_id() const; |
| std::string text() const; |
| ReadState read_state() const; |
| + double creation_time() const; |
|
dcheng
2013/03/26 07:48:50
It seems wasteful to continue adding two accessors
Pete Williamson
2013/03/26 17:18:30
I think the class is nicer to use having accessors
dcheng
2013/03/26 17:49:29
This may be nice but it's a violation of the style
Pete Williamson
2013/03/27 17:07:53
Done.
|
| + int priority() const; |
| + int notification_count() const; |
| + int button_count() const; |
| + std::string default_destination_title() const; |
| + std::string default_destination_icon_url() const; |
| + std::string default_destination_url() const; |
| + std::string button_one_title() const; |
| + std::string button_one_icon_url() const; |
| + std::string button_one_url() const; |
| + std::string button_two_title() const; |
| + std::string button_two_icon_url() const; |
| + std::string button_two_url() const; |
| + std::string contained_notification_title(int index) const; |
| + std::string contained_notification_message(int index) const; |
| bool EqualsIgnoringReadState(const SyncedNotification& other) const; |
| - bool IdMatches(const SyncedNotification& other) const; |
| + bool KeyMatches(const SyncedNotification& other) const; |
|
dcheng
2013/03/26 07:48:50
This is still unused outside of unit tests. If the
Pete Williamson
2013/03/26 17:18:30
Done.
|
| - void NotificationHasBeenRead(); |
| void NotificationHasBeenDismissed(); |
| // This gets a pointer to the SyncedNotificationSpecifics part |
| @@ -76,10 +87,23 @@ class SyncedNotification { |
| GURL ExtractOriginUrl() const; |
| GURL ExtractAppIconUrl() const; |
| GURL ExtractImageUrl() const; |
| - std::string ExtractFirstExternalId() const; |
| - std::string ExtractNotificationId() const; |
| std::string ExtractText() const; |
| ReadState ExtractReadState() const; |
| + double ExtractCreationTime() const; |
| + int ExtractPriority() const; |
| + std::string ExtractDefaultDestinationTitle() const; |
| + std::string ExtractDefaultDestinationIconUrl() const; |
| + std::string ExtractDefaultDestinationUrl() const; |
| + std::string ExtractButtonOneTitle() const; |
| + std::string ExtractButtonOneIconUrl() const; |
| + std::string ExtractButtonOneUrl() const; |
| + std::string ExtractButtonTwoTitle() const; |
| + std::string ExtractButtonTwoIconUrl() const; |
| + std::string ExtractButtonTwoUrl() const; |
| + int ExtractNotificationCount() const; |
| + int ExtractButtonCount() const; |
| + std::string ExtractContainedNotificationTitle(int index) const; |
| + std::string ExtractContainedNotificationMessage(int index) const; |
| sync_pb::SyncedNotificationSpecifics specifics_; |