Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2468)

Unified Diff: chrome/browser/metrics/metrics_service.cc

Issue 8501005: Include PPAPI plugin crashes in the plugin crash data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include PPAPI plugin crash info the plugin crash elements on all platforms. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/metrics/metrics_service.h ('k') | chrome/browser/metrics/metrics_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « chrome/browser/metrics/metrics_service.h ('k') | chrome/browser/metrics/metrics_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698