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

Side by Side Diff: ui/message_center/notification_list.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 10 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 | « ui/gfx/shadow_util.cc ('k') | ui/message_center/views/message_list_view.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/message_center/notification_list.h" 5 #include "ui/message_center/notification_list.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "ui/gfx/image/image.h" 13 #include "ui/gfx/image/image.h"
14 #include "ui/message_center/message_center.h" 14 #include "ui/message_center/message_center.h"
15 #include "ui/message_center/message_center_style.h" 15 #include "ui/message_center/message_center_style.h"
16 #include "ui/message_center/notification.h" 16 #include "ui/message_center/notification.h"
17 #include "ui/message_center/notification_blocker.h" 17 #include "ui/message_center/notification_blocker.h"
18 #include "ui/message_center/notification_types.h" 18 #include "ui/message_center/notification_types.h"
19 19
20 namespace message_center { 20 namespace message_center {
21 21
22 namespace { 22 namespace {
23 23
24 bool ShouldShowNotificationAsPopup( 24 bool ShouldShowNotificationAsPopup(
25 const Notification& notification, 25 const Notification& notification,
26 const NotificationBlockers& blockers) { 26 const NotificationBlockers& blockers) {
27 for (const auto& blocker : blockers) { 27 for (auto* blocker : blockers) {
28 if (!blocker->ShouldShowNotificationAsPopup(notification)) 28 if (!blocker->ShouldShowNotificationAsPopup(notification))
29 return false; 29 return false;
30 } 30 }
31 return true; 31 return true;
32 } 32 }
33 33
34 } // namespace 34 } // namespace
35 35
36 bool ComparePriorityTimestampSerial::operator()(Notification* n1, 36 bool ComparePriorityTimestampSerial::operator()(Notification* n1,
37 Notification* n2) { 37 Notification* n2) {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 notification->set_shown_as_popup(message_center_->IsMessageCenterVisible() 333 notification->set_shown_as_popup(message_center_->IsMessageCenterVisible()
334 || quiet_mode_ 334 || quiet_mode_
335 || notification->shown_as_popup()); 335 || notification->shown_as_popup());
336 } 336 }
337 // Take ownership. The notification can only be removed from the list 337 // Take ownership. The notification can only be removed from the list
338 // in EraseNotification(), which will delete it. 338 // in EraseNotification(), which will delete it.
339 notifications_.insert(std::move(notification)); 339 notifications_.insert(std::move(notification));
340 } 340 }
341 341
342 } // namespace message_center 342 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/gfx/shadow_util.cc ('k') | ui/message_center/views/message_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698