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

Unified Diff: content/public/browser/notification_id_verifier.h

Issue 2534443002: Use notification display service to collect persistent notifications. (Closed)
Patch Set: revert unit test Created 4 years 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
Index: content/public/browser/notification_id_verifier.h
diff --git a/content/public/browser/notification_id_verifier.h b/content/public/browser/notification_id_verifier.h
new file mode 100644
index 0000000000000000000000000000000000000000..231c55bd6d68edd6bd76a113d0041f84575a3359
--- /dev/null
+++ b/content/public/browser/notification_id_verifier.h
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_ID_VERIFIER_H_
+#define CONTENT_PUBLIC_BROWSER_NOTIFICATION_ID_VERIFIER_H_
+
+#include "base/strings/string_piece.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+class CONTENT_EXPORT NotificationIdVerifier {
+ public:
+ // Returns whether |notification_id| belongs to a persistent notification.
+ static bool IsPersistentNotification(
+ const base::StringPiece& notification_id);
+
+ // Returns whether |notification_id| belongs to a non-persistent notification.
+ static bool IsNonPersistentNotification(
+ const base::StringPiece& notification_id);
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_NOTIFICATION_ID_VERIFIER_H_

Powered by Google App Engine
This is Rietveld 408576698