| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/notification_system_observer.h" | 5 #include "chrome/browser/notifications/notification_system_observer.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/notifications/notification_ui_manager.h" | 10 #include "chrome/browser/notifications/notification_ui_manager.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 content::Source<Profile>(source).ptr())); | 57 content::Source<Profile>(source).ptr())); |
| 58 break; | 58 break; |
| 59 default: | 59 default: |
| 60 NOTREACHED(); | 60 NOTREACHED(); |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 void NotificationSystemObserver::OnExtensionUnloaded( | 64 void NotificationSystemObserver::OnExtensionUnloaded( |
| 65 content::BrowserContext* browser_context, | 65 content::BrowserContext* browser_context, |
| 66 const extensions::Extension* extension, | 66 const extensions::Extension* extension, |
| 67 extensions::UnloadedExtensionInfo::Reason reason) { | 67 extensions::UnloadedExtensionReason reason) { |
| 68 ui_manager_->CancelAllBySourceOrigin(extension->url()); | 68 ui_manager_->CancelAllBySourceOrigin(extension->url()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void NotificationSystemObserver::OnShutdown( | 71 void NotificationSystemObserver::OnShutdown( |
| 72 extensions::ExtensionRegistry* registry) { | 72 extensions::ExtensionRegistry* registry) { |
| 73 extension_registry_observer_.Remove(registry); | 73 extension_registry_observer_.Remove(registry); |
| 74 } | 74 } |
| OLD | NEW |