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

Side by Side Diff: chrome/browser/notifications/google_now_notification_stats_collector.h

Issue 2727103002: Remove GoogleNowNotification stats collector (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_GOOGLE_NOW_NOTIFICATION_STATS_COLLECTOR_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_GOOGLE_NOW_NOTIFICATION_STATS_COLLECTOR_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "ui/message_center/message_center.h"
12 #include "ui/message_center/message_center_observer.h"
13 #include "ui/message_center/message_center_types.h"
14
15 // The Google Now Notification Stats Collector listens for message center
16 // events and records stats about Google Now specific notifications.
17 class GoogleNowNotificationStatsCollector
18 : public message_center::MessageCenterObserver {
19 public:
20 explicit GoogleNowNotificationStatsCollector(
21 message_center::MessageCenter* message_center);
22 ~GoogleNowNotificationStatsCollector() override;
23
24 private:
25 // MessageCenterObserver
26 void OnNotificationDisplayed(
27 const std::string& notification_id,
28 const message_center::DisplaySource source) override;
29 void OnCenterVisibilityChanged(
30 message_center::Visibility visibility) override;
31
32 // Counts the number of Google Now Notifications in the message center.
33 int CountVisibleGoogleNowNotifications();
34
35 // Returns true if the ID of a visible notification is for Google Now.
36 bool IsVisibleNotificationIdForGoogleNow(const std::string& notification_id);
37
38 // Weak, global.
39 message_center::MessageCenter* message_center_;
40
41 DISALLOW_COPY_AND_ASSIGN(GoogleNowNotificationStatsCollector);
42 };
43
44 #endif // CHROME_BROWSER_NOTIFICATIONS_GOOGLE_NOW_NOTIFICATION_STATS_COLLECTOR_ H_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/notifications/google_now_notification_stats_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698