Commit b6094f44 authored by Anita Woodruff's avatar Anita Woodruff Committed by Commit Bot

[Cleanup] Use chars for NotificationIdGenerator constants

R=peter@chromium.org

Change-Id: I7f66591e63807506f50614c7d19d0dbaf77d681d
Reviewed-on: https://chromium-review.googlesource.com/904702
Commit-Queue: Anita Woodruff <awdf@chromium.org>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534716}
parent 20f75ed9
...@@ -14,24 +14,24 @@ ...@@ -14,24 +14,24 @@
namespace content { namespace content {
namespace { namespace {
const char kNotificationTagSeparator[] = "#"; const char kNotificationTagSeparator = '#';
const char kPersistentNotificationPrefix[] = "p"; const char kPersistentNotificationPrefix = 'p';
const char kNonPersistentNotificationPrefix[] = "n"; const char kNonPersistentNotificationPrefix = 'n';
} // namespace } // namespace
// static // static
bool NotificationIdGenerator::IsPersistentNotification( bool NotificationIdGenerator::IsPersistentNotification(
const base::StringPiece& notification_id) { const base::StringPiece& notification_id) {
return notification_id.starts_with( return notification_id.length() > 0 &&
std::string(kPersistentNotificationPrefix)); notification_id.front() == kPersistentNotificationPrefix;
} }
// static // static
bool NotificationIdGenerator::IsNonPersistentNotification( bool NotificationIdGenerator::IsNonPersistentNotification(
const base::StringPiece& notification_id) { const base::StringPiece& notification_id) {
return notification_id.starts_with( return notification_id.length() > 0 &&
std::string(kNonPersistentNotificationPrefix)); notification_id.front() == kNonPersistentNotificationPrefix;
} }
// Notification Id is of the following format: // Notification Id is of the following format:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment