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

Side by Side Diff: ui/message_center/message_center_impl.h

Issue 2928433004: Add thread-checker for public methods of message center (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | ui/message_center/message_center_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_ 5 #ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_
6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_ 6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/threading/thread_checker.h"
16 #include "base/time/time.h" 17 #include "base/time/time.h"
17 #include "base/timer/timer.h" 18 #include "base/timer/timer.h"
18 #include "ui/message_center/message_center.h" 19 #include "ui/message_center/message_center.h"
19 #include "ui/message_center/message_center_observer.h" 20 #include "ui/message_center/message_center_observer.h"
20 #include "ui/message_center/message_center_types.h" 21 #include "ui/message_center/message_center_types.h"
21 #include "ui/message_center/notification_blocker.h" 22 #include "ui/message_center/notification_blocker.h"
22 #include "ui/message_center/notifier_settings.h" 23 #include "ui/message_center/notifier_settings.h"
23 #include "ui/message_center/popup_timers_controller.h" 24 #include "ui/message_center/popup_timers_controller.h"
24 25
25 namespace message_center { 26 namespace message_center {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 ~NotificationCache(); 113 ~NotificationCache();
113 void Rebuild(const NotificationList::Notifications& notifications); 114 void Rebuild(const NotificationList::Notifications& notifications);
114 void RecountUnread(); 115 void RecountUnread();
115 116
116 NotificationList::Notifications visible_notifications; 117 NotificationList::Notifications visible_notifications;
117 size_t unread_count; 118 size_t unread_count;
118 }; 119 };
119 120
120 void RemoveNotificationsForNotifierId(const NotifierId& notifier_id); 121 void RemoveNotificationsForNotifierId(const NotifierId& notifier_id);
121 122
123 THREAD_CHECKER(thread_checker_);
124
122 std::unique_ptr<NotificationList> notification_list_; 125 std::unique_ptr<NotificationList> notification_list_;
123 NotificationCache notification_cache_; 126 NotificationCache notification_cache_;
124 base::ObserverList<MessageCenterObserver> observer_list_; 127 base::ObserverList<MessageCenterObserver> observer_list_;
125 std::unique_ptr<PopupTimersController> popup_timers_controller_; 128 std::unique_ptr<PopupTimersController> popup_timers_controller_;
126 std::unique_ptr<base::OneShotTimer> quiet_mode_timer_; 129 std::unique_ptr<base::OneShotTimer> quiet_mode_timer_;
127 NotifierSettingsProvider* settings_provider_; 130 NotifierSettingsProvider* settings_provider_;
128 std::vector<NotificationBlocker*> blockers_; 131 std::vector<NotificationBlocker*> blockers_;
129 132
130 bool locked_ = false; 133 bool locked_ = false;
131 bool visible_ = false; 134 bool visible_ = false;
132 135
133 // Queue for the notifications to delay the addition/updates when the message 136 // Queue for the notifications to delay the addition/updates when the message
134 // center is visible. 137 // center is visible.
135 std::unique_ptr<internal::ChangeQueue> notification_queue_; 138 std::unique_ptr<internal::ChangeQueue> notification_queue_;
136 139
137 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); 140 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl);
138 }; 141 };
139 142
140 } // namespace message_center 143 } // namespace message_center
141 144
142 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ 145 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/message_center_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698