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

Unified Diff: ui/message_center/notifier_settings.h

Issue 101473003: Do not allow creating dummy notifier id from production, for safety. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 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
« no previous file with comments | « ui/message_center/message_center_tray_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/notifier_settings.h
diff --git a/ui/message_center/notifier_settings.h b/ui/message_center/notifier_settings.h
index cbd2cc32eaab1f6cb90d29e61e31e0b59941fe51..b14e72be96f06e5ae070a72c8c651ab201fad431 100644
--- a/ui/message_center/notifier_settings.h
+++ b/ui/message_center/notifier_settings.h
@@ -7,12 +7,23 @@
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/strings/string16.h"
#include "ui/gfx/image/image.h"
#include "ui/message_center/message_center_export.h"
#include "url/gurl.h"
+FORWARD_DECLARE_TEST(MessageCenterTrayBridgeTest,
+ StatusItemOnlyAfterFirstNotification);
+
+namespace ash {
+class WebNotificationTrayTest;
+}
+
namespace message_center {
+namespace test {
+class MessagePopupCollectionTest;
+}
class NotifierSettingsDelegate;
class NotifierSettingsProvider;
@@ -39,9 +50,6 @@ struct MESSAGE_CENTER_EXPORT NotifierId {
// Constructor for WEB_PAGE type.
explicit NotifierId(const GURL& url);
- // The default constructor which doesn't specify the notifier. Used for tests.
- NotifierId();
-
bool operator==(const NotifierId& other) const;
NotifierType type;
@@ -55,6 +63,22 @@ struct MESSAGE_CENTER_EXPORT NotifierId {
// The identifier of the profile where the notification is created. This is
// used for ChromeOS multi-profile support and can be empty.
std::string profile_id;
+
+ private:
+ friend class MessageCenterTrayTest;
+ friend class test::MessagePopupCollectionTest;
+ friend class NotificationControllerTest;
+ friend class PopupCollectionTest;
+ friend class TrayViewControllerTest;
+ friend class ash::WebNotificationTrayTest;
+ FRIEND_TEST_ALL_PREFIXES(::MessageCenterTrayBridgeTest,
+ StatusItemOnlyAfterFirstNotification);
+ FRIEND_TEST_ALL_PREFIXES(PopupControllerTest, Creation);
+ FRIEND_TEST_ALL_PREFIXES(NotificationListTest, UnreadCountNoNegative);
+ FRIEND_TEST_ALL_PREFIXES(NotificationListTest, TestHasNotificationOfType);
+
+ // The default constructor which doesn't specify the notifier. Used for tests.
+ NotifierId();
};
// The struct to hold the information of notifiers. The information will be
« no previous file with comments | « ui/message_center/message_center_tray_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698