| Index: chrome/browser/metrics/metrics_service.cc
|
| diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
|
| index 2342d74c6a49060786494205f0e6de81c9f4ff59..06aafc17a54f82901625fbe8cee53b205b090e74 100644
|
| --- a/chrome/browser/metrics/metrics_service.cc
|
| +++ b/chrome/browser/metrics/metrics_service.cc
|
| @@ -178,7 +178,6 @@
|
| #include "content/browser/load_notification_details.h"
|
| #include "content/browser/plugin_service.h"
|
| #include "content/browser/renderer_host/render_process_host.h"
|
| -#include "content/common/child_process_info.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/common/url_fetcher.h"
|
| #include "webkit/plugins/npapi/plugin_list.h"
|
| @@ -1358,7 +1357,7 @@ void MetricsService::LogChildProcessChange(
|
| stats.process_crashes++;
|
| // Exclude plugin crashes from the count below because we report them via
|
| // a separate UMA metric.
|
| - if (child_details->type() != ChildProcessInfo::PLUGIN_PROCESS) {
|
| + if (!IsPluginProcess(child_details->type())) {
|
| IncrementPrefValue(prefs::kStabilityChildProcessCrashCount);
|
| }
|
| break;
|
| @@ -1475,7 +1474,7 @@ void MetricsService::RecordPluginChanges(PrefService* pref) {
|
| ChildProcessStats stats = cache_iter->second;
|
|
|
| // Insert only plugins information into the plugins list.
|
| - if (ChildProcessInfo::PLUGIN_PROCESS != stats.process_type)
|
| + if (!IsPluginProcess(stats.process_type))
|
| continue;
|
|
|
| // TODO(viettrungluu): remove conversion
|
| @@ -1521,6 +1520,12 @@ void MetricsService::RecordCurrentState(PrefService* pref) {
|
| RecordPluginChanges(pref);
|
| }
|
|
|
| +// static
|
| +bool MetricsService::IsPluginProcess(ChildProcessInfo::ProcessType type) {
|
| + return (type == ChildProcessInfo::PLUGIN_PROCESS ||
|
| + type == ChildProcessInfo::PPAPI_PLUGIN_PROCESS);
|
| +}
|
| +
|
| static bool IsSingleThreaded() {
|
| static base::PlatformThreadId thread_id = 0;
|
| if (!thread_id)
|
|
|