| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/platform_notification_service_impl.h" | 5 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void CancelNotification(const std::string& id, ProfileID profile_id) { | 69 void CancelNotification(const std::string& id, ProfileID profile_id) { |
| 70 PlatformNotificationServiceImpl::GetInstance() | 70 PlatformNotificationServiceImpl::GetInstance() |
| 71 ->GetNotificationUIManager()->CancelById(id, profile_id); | 71 ->GetNotificationUIManager()->CancelById(id, profile_id); |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace | 74 } // namespace |
| 75 | 75 |
| 76 // static | 76 // static |
| 77 PlatformNotificationServiceImpl* | 77 PlatformNotificationServiceImpl* |
| 78 PlatformNotificationServiceImpl::GetInstance() { | 78 PlatformNotificationServiceImpl::GetInstance() { |
| 79 return Singleton<PlatformNotificationServiceImpl>::get(); | 79 return base::Singleton<PlatformNotificationServiceImpl>::get(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 PlatformNotificationServiceImpl::PlatformNotificationServiceImpl() | 82 PlatformNotificationServiceImpl::PlatformNotificationServiceImpl() |
| 83 : notification_ui_manager_for_tests_(nullptr) {} | 83 : notification_ui_manager_for_tests_(nullptr) {} |
| 84 | 84 |
| 85 PlatformNotificationServiceImpl::~PlatformNotificationServiceImpl() {} | 85 PlatformNotificationServiceImpl::~PlatformNotificationServiceImpl() {} |
| 86 | 86 |
| 87 void PlatformNotificationServiceImpl::OnPersistentNotificationClick( | 87 void PlatformNotificationServiceImpl::OnPersistentNotificationClick( |
| 88 BrowserContext* browser_context, | 88 BrowserContext* browser_context, |
| 89 int64_t persistent_notification_id, | 89 int64_t persistent_notification_id, |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 extensions::ExtensionRegistry::Get(profile)->GetExtensionById( | 380 extensions::ExtensionRegistry::Get(profile)->GetExtensionById( |
| 381 origin.host(), extensions::ExtensionRegistry::EVERYTHING); | 381 origin.host(), extensions::ExtensionRegistry::EVERYTHING); |
| 382 DCHECK(extension); | 382 DCHECK(extension); |
| 383 | 383 |
| 384 return base::UTF8ToUTF16(extension->name()); | 384 return base::UTF8ToUTF16(extension->name()); |
| 385 } | 385 } |
| 386 #endif | 386 #endif |
| 387 | 387 |
| 388 return base::string16(); | 388 return base::string16(); |
| 389 } | 389 } |
| OLD | NEW |