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

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

Issue 19056002: Enable and disable Synced Notification Client Services (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enable first synced notification service Created 7 years, 5 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.cc
diff --git a/chrome/browser/notifications/sync_notifier/synced_notification.cc b/chrome/browser/notifications/sync_notifier/synced_notification.cc
index 851c5d68ac105da38c1426ee8ece1706c6df0fe3..21ed5e9cb585b4f13dbcd42bc8b36a17161c71bc 100644
--- a/chrome/browser/notifications/sync_notifier/synced_notification.cc
+++ b/chrome/browser/notifications/sync_notifier/synced_notification.cc
@@ -22,6 +22,12 @@
namespace {
const char kExtensionScheme[] = "chrome-extension://";
+// The name of our first synced notification service.
+// TODO(petewil): remove this hardcoding once we have the synced notification
Dmitry Titov 2013/07/18 22:30:52 This also needs a bug number on creating a way to
Pete Williamson 2013/07/19 18:50:13 Done.
+// signalling sync data type set up to provide this.
+const char kFirstSyncedNotificationServiceId[] = "Google+";
+
+
// Today rich notifications only supports two buttons, make sure we don't
// try to supply them with more than this number of buttons.
const unsigned int kMaxNotificationButtonIndex = 2;
@@ -470,7 +476,9 @@ int SyncedNotification::GetPriority() const {
return message_center::DEFAULT_PRIORITY;
} else if (protobuf_priority ==
sync_pb::CoalescedSyncedNotification_Priority_HIGH) {
- return message_center::HIGH_PRIORITY;
+ // High priority synced notifications are considered default priority in
+ // Chrome.
+ return message_center::DEFAULT_PRIORITY;
} else {
// Complain if this is a new priority we have not seen before.
DCHECK(protobuf_priority <
@@ -575,4 +583,12 @@ std::string SyncedNotification::GetContainedNotificationMessage(
collapsed_info(index).simple_collapsed_layout().description();
}
+std::string SyncedNotification::GetSendingServiceName() const {
+ // TODO(petewil): We are building a new protocol (a new sync datatype) to send
+ // the service name and icon from the server. For now this method is
+ // hardcoded to the name of our first service using synced notifications.
+ // Once the new protocol is built, remove this hardcoding.
+ return kFirstSyncedNotificationServiceId;
+}
+
} // namespace notifier

Powered by Google App Engine
This is Rietveld 408576698