Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/notifications/non_persistent_notification_handler.h" | 5 #include "chrome/browser/notifications/non_persistent_notification_handler.h" |
| 6 | 6 |
| 7 #include "base/strings/nullable_string16.h" | 7 #include "base/strings/nullable_string16.h" |
| 8 #include "chrome/browser/notifications/notification_delegate.h" | 8 #include "chrome/browser/notifications/notification_delegate.h" |
| 9 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 9 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 } | 35 } |
| 36 } | 36 } |
| 37 | 37 |
| 38 void NonPersistentNotificationHandler::OpenSettings(Profile* profile) { | 38 void NonPersistentNotificationHandler::OpenSettings(Profile* profile) { |
| 39 NotificationCommon::OpenNotificationSettings(profile); | 39 NotificationCommon::OpenNotificationSettings(profile); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void NonPersistentNotificationHandler::RegisterNotification( | 42 void NonPersistentNotificationHandler::RegisterNotification( |
| 43 const std::string& notification_id, | 43 const std::string& notification_id, |
| 44 NotificationDelegate* delegate) { | 44 NotificationDelegate* delegate) { |
| 45 DCHECK_EQ(notifications_.count(notification_id), 0u); | |
|
Peter Beverloo
2017/04/13 14:14:14
ohhh I guess this is invalid for replacements, rig
Miguel Garcia
2017/04/13 16:36:19
Acknowledged.
| |
| 46 notifications_[notification_id] = | 45 notifications_[notification_id] = |
| 47 scoped_refptr<NotificationDelegate>(delegate); | 46 scoped_refptr<NotificationDelegate>(delegate); |
| 48 } | 47 } |
| OLD | NEW |