| 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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 | 587 |
| 588 // Check if the reason for the install was due to a successful | 588 // Check if the reason for the install was due to a successful |
| 589 // extension update. |extension| is NULL in case of install failure. | 589 // extension update. |extension| is NULL in case of install failure. |
| 590 if (extension && | 590 if (extension && |
| 591 installer->install_cause() == extension_misc::INSTALL_CAUSE_UPDATE) { | 591 installer->install_cause() == extension_misc::INSTALL_CAUSE_UPDATE) { |
| 592 AddExtensionEvent(EVENT_EXTENSION_UPDATE, extension); | 592 AddExtensionEvent(EVENT_EXTENSION_UPDATE, extension); |
| 593 } | 593 } |
| 594 break; | 594 break; |
| 595 } | 595 } |
| 596 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED: { | 596 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED: { |
| 597 AddExtensionEvent(EVENT_EXTENSION_UNINSTALL, | 597 extensions::UninstalledExtensionInfo* info = |
| 598 content::Details<Extension>(details).ptr()); | 598 content::Details<extensions::UninstalledExtensionInfo>(details).ptr(); |
| 599 AddExtensionEvent(EVENT_EXTENSION_UNINSTALL, info->extension); |
| 599 break; | 600 break; |
| 600 } | 601 } |
| 601 case content::NOTIFICATION_RENDER_WIDGET_HOST_HANG: { | 602 case content::NOTIFICATION_RENDER_WIDGET_HOST_HANG: { |
| 602 std::string url; | 603 std::string url; |
| 603 content::RenderWidgetHost* widget = | 604 content::RenderWidgetHost* widget = |
| 604 content::Source<content::RenderWidgetHost>(source).ptr(); | 605 content::Source<content::RenderWidgetHost>(source).ptr(); |
| 605 if (widget->IsRenderView()) { | 606 if (widget->IsRenderView()) { |
| 606 content::RenderViewHost* view = content::RenderViewHost::From(widget); | 607 content::RenderViewHost* view = content::RenderViewHost::From(widget); |
| 607 MaybeGetURLFromRenderView(view, &url); | 608 MaybeGetURLFromRenderView(view, &url); |
| 608 } | 609 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 if (!url_list.empty()) | 706 if (!url_list.empty()) |
| 706 url_list += ", "; | 707 url_list += ", "; |
| 707 | 708 |
| 708 url_list += url; | 709 url_list += url; |
| 709 } | 710 } |
| 710 | 711 |
| 711 AddEvent(util::CreateRendererFailureEvent(base::Time::Now(), type, url_list)); | 712 AddEvent(util::CreateRendererFailureEvent(base::Time::Now(), type, url_list)); |
| 712 } | 713 } |
| 713 | 714 |
| 714 } // namespace performance_monitor | 715 } // namespace performance_monitor |
| OLD | NEW |