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

Unified Diff: ui/arc/notification/arc_notification_item.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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 | « tools/battor_agent/battor_connection_impl.cc ('k') | ui/arc/notification/arc_notification_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/arc/notification/arc_notification_item.cc
diff --git a/ui/arc/notification/arc_notification_item.cc b/ui/arc/notification/arc_notification_item.cc
index 05e67ab07eecbe4533b59515abddc9a4076e4592..694f41bdde7867f0f7218a3c1484f85e7bc4c4a8 100644
--- a/ui/arc/notification/arc_notification_item.cc
+++ b/ui/arc/notification/arc_notification_item.cc
@@ -104,15 +104,15 @@ void ArcNotificationItem::UpdateWithArcNotificationData(
message_center::NotificationType type;
switch (data.type) {
- case ARC_NOTIFICATION_TYPE_BASIC:
+ case ArcNotificationType::BASIC:
type = message_center::NOTIFICATION_TYPE_SIMPLE;
break;
- case ARC_NOTIFICATION_TYPE_IMAGE:
+ case ArcNotificationType::IMAGE:
// TODO(yoshiki): Implement this types.
type = message_center::NOTIFICATION_TYPE_SIMPLE;
LOG(ERROR) << "Unsupported notification type: image";
break;
- case ARC_NOTIFICATION_TYPE_PROGRESS:
+ case ArcNotificationType::PROGRESS:
type = message_center::NOTIFICATION_TYPE_PROGRESS;
rich_data.timestamp = base::Time::UnixEpoch() +
base::TimeDelta::FromMilliseconds(data.time);
@@ -122,7 +122,7 @@ void ArcNotificationItem::UpdateWithArcNotificationData(
data.progress_max * 100))));
break;
}
- DCHECK(0 <= data.type && data.type <= ARC_NOTIFICATION_TYPE_MAX)
+ DCHECK(ArcNotificationType_IsValidValue(data.type))
<< "Unsupported notification type: " << data.type;
// The identifier of the notifier, which is used to distinguish the notifiers
« no previous file with comments | « tools/battor_agent/battor_connection_impl.cc ('k') | ui/arc/notification/arc_notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698