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

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 notification service: remove bitmaps 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
« no previous file with comments | « chrome/browser/notifications/sync_notifier/synced_notification.h ('k') | ui/base/strings/ui_strings.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..90275e376d7e0a65edc688e9e4237b914273f7a4 100644
--- a/chrome/browser/notifications/sync_notifier/synced_notification.cc
+++ b/chrome/browser/notifications/sync_notifier/synced_notification.cc
@@ -22,6 +22,13 @@
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
+// signalling sync data type set up to provide this.
+// crbug.com/248337
+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 +477,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 +584,12 @@ std::string SyncedNotification::GetContainedNotificationMessage(
collapsed_info(index).simple_collapsed_layout().description();
}
+std::string SyncedNotification::GetSendingServiceId() 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
« no previous file with comments | « chrome/browser/notifications/sync_notifier/synced_notification.h ('k') | ui/base/strings/ui_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698