OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/android/hung_renderer_infobar_delegate.h" | 5 #include "chrome/browser/android/hung_renderer_infobar_delegate.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "chrome/browser/android/android_theme_resources.h" | 9 #include "chrome/browser/android/android_theme_resources.h" |
10 #include "chrome/browser/infobars/infobar_service.h" | 10 #include "chrome/browser/infobars/infobar_service.h" |
11 #include "chrome/grit/generated_resources.h" | 11 #include "chrome/grit/generated_resources.h" |
12 #include "components/infobars/core/infobar.h" | 12 #include "components/infobars/core/infobar.h" |
13 #include "content/public/browser/render_process_host.h" | 13 #include "content/public/browser/render_process_host.h" |
14 #include "content/public/common/result_codes.h" | 14 #include "content/public/common/result_codes.h" |
15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
16 | 16 |
17 // static | 17 // static |
18 void HungRendererInfoBarDelegate::Create( | 18 void HungRendererInfoBarDelegate::Create( |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 LogEvent(WAIT_CLICKED); | 77 LogEvent(WAIT_CLICKED); |
78 return true; | 78 return true; |
79 } | 79 } |
80 | 80 |
81 void HungRendererInfoBarDelegate::LogEvent(Event event) { | 81 void HungRendererInfoBarDelegate::LogEvent(Event event) { |
82 DCHECK(!terminal_event_logged_for_uma_); | 82 DCHECK(!terminal_event_logged_for_uma_); |
83 terminal_event_logged_for_uma_ = true; | 83 terminal_event_logged_for_uma_ = true; |
84 UMA_HISTOGRAM_ENUMERATION("Renderer.Hung.MobileInfoBar.UserEvent", event, | 84 UMA_HISTOGRAM_ENUMERATION("Renderer.Hung.MobileInfoBar.UserEvent", event, |
85 EVENT_COUNT); | 85 EVENT_COUNT); |
86 } | 86 } |
OLD | NEW |