| 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 "chrome/browser/notifications/notification_delegate.h" | 8 #include "chrome/browser/notifications/notification_delegate.h" |
| 8 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 9 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
| 9 | 10 |
| 10 NonPersistentNotificationHandler::NonPersistentNotificationHandler() {} | 11 NonPersistentNotificationHandler::NonPersistentNotificationHandler() {} |
| 11 NonPersistentNotificationHandler::~NonPersistentNotificationHandler() {} | 12 NonPersistentNotificationHandler::~NonPersistentNotificationHandler() {} |
| 12 | 13 |
| 13 void NonPersistentNotificationHandler::OnClose( | 14 void NonPersistentNotificationHandler::OnClose( |
| 14 Profile* profile, | 15 Profile* profile, |
| 15 const std::string& origin, | 16 const std::string& origin, |
| 16 const std::string& notification_id, | 17 const std::string& notification_id, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 40 NotificationCommon::OpenNotificationSettings(profile); | 41 NotificationCommon::OpenNotificationSettings(profile); |
| 41 } | 42 } |
| 42 | 43 |
| 43 void NonPersistentNotificationHandler::RegisterNotification( | 44 void NonPersistentNotificationHandler::RegisterNotification( |
| 44 const std::string& notification_id, | 45 const std::string& notification_id, |
| 45 NotificationDelegate* delegate) { | 46 NotificationDelegate* delegate) { |
| 46 DCHECK_EQ(notifications_.count(notification_id), 0u); | 47 DCHECK_EQ(notifications_.count(notification_id), 0u); |
| 47 notifications_[notification_id] = | 48 notifications_[notification_id] = |
| 48 scoped_refptr<NotificationDelegate>(delegate); | 49 scoped_refptr<NotificationDelegate>(delegate); |
| 49 } | 50 } |
| OLD | NEW |