| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/performance_monitor/performance_monitor.h" | 5 #include "chrome/browser/performance_monitor/performance_monitor.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 } | 226 } |
| 227 | 227 |
| 228 void PerformanceMonitor::RegisterForNotifications() { | 228 void PerformanceMonitor::RegisterForNotifications() { |
| 229 DCHECK(database_logging_enabled_); | 229 DCHECK(database_logging_enabled_); |
| 230 | 230 |
| 231 // Extensions | 231 // Extensions |
| 232 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED, | 232 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED, |
| 233 content::NotificationService::AllSources()); | 233 content::NotificationService::AllSources()); |
| 234 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_ENABLED, | 234 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_ENABLED, |
| 235 content::NotificationService::AllSources()); | 235 content::NotificationService::AllSources()); |
| 236 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 236 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, |
| 237 content::NotificationService::AllSources()); | 237 content::NotificationService::AllSources()); |
| 238 registrar_.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 238 registrar_.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
| 239 content::NotificationService::AllSources()); | 239 content::NotificationService::AllSources()); |
| 240 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, | 240 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, |
| 241 content::NotificationService::AllSources()); | 241 content::NotificationService::AllSources()); |
| 242 | 242 |
| 243 // Crashes | 243 // Crashes |
| 244 registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_HANG, | 244 registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_HANG, |
| 245 content::NotificationService::AllSources()); | 245 content::NotificationService::AllSources()); |
| 246 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED, | 246 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED, |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 EVENT_EXTENSION_INSTALL, | 559 EVENT_EXTENSION_INSTALL, |
| 560 content::Details<const extensions::InstalledExtensionInfo>(details)-> | 560 content::Details<const extensions::InstalledExtensionInfo>(details)-> |
| 561 extension); | 561 extension); |
| 562 break; | 562 break; |
| 563 } | 563 } |
| 564 case chrome::NOTIFICATION_EXTENSION_ENABLED: { | 564 case chrome::NOTIFICATION_EXTENSION_ENABLED: { |
| 565 AddExtensionEvent(EVENT_EXTENSION_ENABLE, | 565 AddExtensionEvent(EVENT_EXTENSION_ENABLE, |
| 566 content::Details<Extension>(details).ptr()); | 566 content::Details<Extension>(details).ptr()); |
| 567 break; | 567 break; |
| 568 } | 568 } |
| 569 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { | 569 case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: { |
| 570 const UnloadedExtensionInfo* info = | 570 const UnloadedExtensionInfo* info = |
| 571 content::Details<UnloadedExtensionInfo>(details).ptr(); | 571 content::Details<UnloadedExtensionInfo>(details).ptr(); |
| 572 | 572 |
| 573 // Check if the extension was unloaded because it was disabled. | 573 // Check if the extension was unloaded because it was disabled. |
| 574 if (info->reason == UnloadedExtensionInfo::REASON_DISABLE) { | 574 if (info->reason == UnloadedExtensionInfo::REASON_DISABLE) { |
| 575 AddExtensionEvent(EVENT_EXTENSION_DISABLE, | 575 AddExtensionEvent(EVENT_EXTENSION_DISABLE, |
| 576 info->extension); | 576 info->extension); |
| 577 } | 577 } |
| 578 break; | 578 break; |
| 579 } | 579 } |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 if (!url_list.empty()) | 703 if (!url_list.empty()) |
| 704 url_list += ", "; | 704 url_list += ", "; |
| 705 | 705 |
| 706 url_list += url; | 706 url_list += url; |
| 707 } | 707 } |
| 708 | 708 |
| 709 AddEvent(util::CreateRendererFailureEvent(base::Time::Now(), type, url_list)); | 709 AddEvent(util::CreateRendererFailureEvent(base::Time::Now(), type, url_list)); |
| 710 } | 710 } |
| 711 | 711 |
| 712 } // namespace performance_monitor | 712 } // namespace performance_monitor |
| OLD | NEW |