Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 9291e9f115c90b8a1a3f70aa66eab23b76a33dd8..134624ea56a499f5ee181d4e8808e3a6ad963f99 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -7,6 +7,7 @@ |
#include <utility> |
#include "base/command_line.h" |
+#include "base/metrics/field_trial.h" |
#include "base/metrics/histogram.h" |
#include "base/metrics/stats_counters.h" |
#include "base/string16.h" |
@@ -2328,6 +2329,20 @@ void WebContentsImpl::OnSetSelectedColorInColorChooser(int color_chooser_id, |
void WebContentsImpl::OnPepperPluginHung(int plugin_child_id, |
const FilePath& path, |
bool is_hung) { |
+ HISTOGRAM_COUNTS("Pepper.PluginHung", 1); |
+ |
+ // TODO(shess): http://crbug.com/153383 debugging. Determine how |
+ // often hangs happen when using worker pool versus FILE thread. |
+ // kFieldTrialName needs to match the value in pepper_flash.cc, but |
+ // plumbing that through would be disruptive for temporary code. |
+ const char* const kFieldTrialName = "FlapperIOThread"; |
yzshen1
2012/10/02 23:33:44
static, please.
Scott Hess - ex-Googler
2012/10/02 23:42:31
OK. But I think it's already implicitly static, s
|
+ static const bool hung_trial_exists = |
+ base::FieldTrialList::TrialExists(kFieldTrialName); |
+ if (hung_trial_exists) { |
+ HISTOGRAM_COUNTS(base::FieldTrial::MakeName("Pepper.PluginHung", |
+ kFieldTrialName), 1); |
+ } |
+ |
FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
PluginHungStatusChanged(plugin_child_id, path, is_hung)); |
} |