diff options
author | petewil@chromium.org <petewil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-03 01:33:03 +0000 |
---|---|---|
committer | petewil@chromium.org <petewil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-03 01:33:03 +0000 |
commit | b3e54707da467523766deae7c24c9c0b98dbd89f (patch) | |
tree | a142a2c5ed1989abb8275104c7fa411c57ef0de7 /chrome/browser/notifications | |
parent | 766a13ffafa1dc641ef36de99de54ad458521cf2 (diff) | |
download | chromium_src-b3e54707da467523766deae7c24c9c0b98dbd89f.zip chromium_src-b3e54707da467523766deae7c24c9c0b98dbd89f.tar.gz chromium_src-b3e54707da467523766deae7c24c9c0b98dbd89f.tar.bz2 |
Properly map server prioritites to chrome priorities.
The notification server priorities are different than the chrome priorities.
We should map them so that a server side medium priority is a chrome low
priority, and a server side low priority is a chrome min priority.
The unit tests are also updated for the new priority mappings.
BUG=297255
Review URL: https://codereview.chromium.org/25727004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications')
-rw-r--r-- | chrome/browser/notifications/sync_notifier/synced_notification.cc | 6 | ||||
-rw-r--r-- | chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/chrome/browser/notifications/sync_notifier/synced_notification.cc b/chrome/browser/notifications/sync_notifier/synced_notification.cc index 8394226..2f827c2 100644 --- a/chrome/browser/notifications/sync_notifier/synced_notification.cc +++ b/chrome/browser/notifications/sync_notifier/synced_notification.cc @@ -549,14 +549,12 @@ int SyncedNotification::GetPriority() const { // Convert the prioroty to the scheme used by the notification center. if (protobuf_priority == sync_pb::CoalescedSyncedNotification_Priority_LOW) { - return message_center::LOW_PRIORITY; + return message_center::MIN_PRIORITY; } else if (protobuf_priority == sync_pb::CoalescedSyncedNotification_Priority_STANDARD) { - return message_center::DEFAULT_PRIORITY; + return message_center::LOW_PRIORITY; } else if (protobuf_priority == sync_pb::CoalescedSyncedNotification_Priority_HIGH) { - // 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. diff --git a/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc b/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc index b372eca..c54825e 100644 --- a/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc +++ b/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc @@ -27,7 +27,7 @@ using sync_pb::SyncedNotificationSpecifics; namespace { const int kNotificationPriority = static_cast<int>( - message_center::LOW_PRIORITY); + message_center::MIN_PRIORITY); bool UseRichNotifications() { return message_center::IsRichNotificationEnabled(); |