| Index: ui/notifications/notification_types.cc
|
| diff --git a/ui/notifications/notification_types.cc b/ui/notifications/notification_types.cc
|
| index 1b720d68582d9b76a7bd0e8adce42589755eddf0..484d4713d05f9f1f6099d85815960b56b326982a 100644
|
| --- a/ui/notifications/notification_types.cc
|
| +++ b/ui/notifications/notification_types.cc
|
| @@ -8,6 +8,7 @@ namespace {
|
|
|
| const char kSimpleType[] = "simple";
|
| const char kBaseFormatType[] = "base";
|
| +const char kImageType[] = "image";
|
| const char kMultipleType[] = "multiple";
|
|
|
| } // namespace
|
| @@ -32,15 +33,12 @@ const char kItemTitleKey[] = "title";
|
| const char kItemMessageKey[] = "message";
|
|
|
| NotificationType StringToNotificationType(std::string& string_type) {
|
| - if (string_type == kSimpleType)
|
| - return NOTIFICATION_TYPE_SIMPLE;
|
| - if (string_type == kBaseFormatType)
|
| - return NOTIFICATION_TYPE_BASE_FORMAT;
|
| - if (string_type == kMultipleType)
|
| - return NOTIFICATION_TYPE_MULTIPLE;
|
| -
|
| // In case of unrecognized string, fall back to most common type.
|
| - return NOTIFICATION_TYPE_SIMPLE;
|
| + return (string_type == kSimpleType) ? NOTIFICATION_TYPE_SIMPLE :
|
| + (string_type == kBaseFormatType) ? NOTIFICATION_TYPE_BASE_FORMAT :
|
| + (string_type == kImageType) ? NOTIFICATION_TYPE_IMAGE :
|
| + (string_type == kMultipleType) ? NOTIFICATION_TYPE_MULTIPLE :
|
| + NOTIFICATION_TYPE_SIMPLE;
|
| }
|
|
|
| } // namespace notifications
|
|
|