| 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 | 485 |
| 486 if (initialized_ && !request.url().SchemeIsFile()) | 486 if (initialized_ && !request.url().SchemeIsFile()) |
| 487 performance_data_for_io_thread_.network_bytes_read += bytes_read; | 487 performance_data_for_io_thread_.network_bytes_read += bytes_read; |
| 488 } | 488 } |
| 489 | 489 |
| 490 void PerformanceMonitor::Observe(int type, | 490 void PerformanceMonitor::Observe(int type, |
| 491 const content::NotificationSource& source, | 491 const content::NotificationSource& source, |
| 492 const content::NotificationDetails& details) { | 492 const content::NotificationDetails& details) { |
| 493 switch (type) { | 493 switch (type) { |
| 494 case chrome::NOTIFICATION_EXTENSION_INSTALLED: { | 494 case chrome::NOTIFICATION_EXTENSION_INSTALLED: { |
| 495 AddExtensionEvent(EVENT_EXTENSION_INSTALL, | 495 AddExtensionEvent( |
| 496 content::Details<Extension>(details).ptr()); | 496 EVENT_EXTENSION_INSTALL, |
| 497 content::Details<const extensions::InstalledExtensionInfo>(details)-> |
| 498 extension); |
| 497 break; | 499 break; |
| 498 } | 500 } |
| 499 case chrome::NOTIFICATION_EXTENSION_ENABLED: { | 501 case chrome::NOTIFICATION_EXTENSION_ENABLED: { |
| 500 AddExtensionEvent(EVENT_EXTENSION_ENABLE, | 502 AddExtensionEvent(EVENT_EXTENSION_ENABLE, |
| 501 content::Details<Extension>(details).ptr()); | 503 content::Details<Extension>(details).ptr()); |
| 502 break; | 504 break; |
| 503 } | 505 } |
| 504 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { | 506 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { |
| 505 const extensions::UnloadedExtensionInfo* info = | 507 const extensions::UnloadedExtensionInfo* info = |
| 506 content::Details<extensions::UnloadedExtensionInfo>(details).ptr(); | 508 content::Details<extensions::UnloadedExtensionInfo>(details).ptr(); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 if (!url_list.empty()) | 644 if (!url_list.empty()) |
| 643 url_list += ", "; | 645 url_list += ", "; |
| 644 | 646 |
| 645 url_list += url; | 647 url_list += url; |
| 646 } | 648 } |
| 647 | 649 |
| 648 AddEvent(util::CreateRendererFailureEvent(base::Time::Now(), type, url_list)); | 650 AddEvent(util::CreateRendererFailureEvent(base::Time::Now(), type, url_list)); |
| 649 } | 651 } |
| 650 | 652 |
| 651 } // namespace performance_monitor | 653 } // namespace performance_monitor |
| OLD | NEW |