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/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void CancelNotification(const std::string& id, ProfileID profile_id) { | 67 void CancelNotification(const std::string& id, ProfileID profile_id) { |
68 PlatformNotificationServiceImpl::GetInstance() | 68 PlatformNotificationServiceImpl::GetInstance() |
69 ->GetNotificationUIManager()->CancelById(id, profile_id); | 69 ->GetNotificationUIManager()->CancelById(id, profile_id); |
70 } | 70 } |
71 | 71 |
72 } // namespace | 72 } // namespace |
73 | 73 |
74 // static | 74 // static |
75 PlatformNotificationServiceImpl* | 75 PlatformNotificationServiceImpl* |
76 PlatformNotificationServiceImpl::GetInstance() { | 76 PlatformNotificationServiceImpl::GetInstance() { |
77 return Singleton<PlatformNotificationServiceImpl>::get(); | 77 return base::Singleton<PlatformNotificationServiceImpl>::get(); |
78 } | 78 } |
79 | 79 |
80 PlatformNotificationServiceImpl::PlatformNotificationServiceImpl() | 80 PlatformNotificationServiceImpl::PlatformNotificationServiceImpl() |
81 : notification_ui_manager_for_tests_(nullptr) {} | 81 : notification_ui_manager_for_tests_(nullptr) {} |
82 | 82 |
83 PlatformNotificationServiceImpl::~PlatformNotificationServiceImpl() {} | 83 PlatformNotificationServiceImpl::~PlatformNotificationServiceImpl() {} |
84 | 84 |
85 void PlatformNotificationServiceImpl::OnPersistentNotificationClick( | 85 void PlatformNotificationServiceImpl::OnPersistentNotificationClick( |
86 BrowserContext* browser_context, | 86 BrowserContext* browser_context, |
87 int64_t persistent_notification_id, | 87 int64_t persistent_notification_id, |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 extensions::ExtensionRegistry::Get(profile)->GetExtensionById( | 372 extensions::ExtensionRegistry::Get(profile)->GetExtensionById( |
373 origin.host(), extensions::ExtensionRegistry::EVERYTHING); | 373 origin.host(), extensions::ExtensionRegistry::EVERYTHING); |
374 DCHECK(extension); | 374 DCHECK(extension); |
375 | 375 |
376 return base::UTF8ToUTF16(extension->name()); | 376 return base::UTF8ToUTF16(extension->name()); |
377 } | 377 } |
378 #endif | 378 #endif |
379 | 379 |
380 return base::string16(); | 380 return base::string16(); |
381 } | 381 } |
OLD | NEW |