OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/metrics/chrome_stability_metrics_provider.h" | 5 #include "chrome/browser/metrics/chrome_stability_metrics_provider.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
11 #include "base/metrics/sparse_histogram.h" | 11 #include "base/metrics/sparse_histogram.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
14 #include "content/public/browser/child_process_data.h" | 14 #include "content/public/browser/child_process_data.h" |
15 #include "content/public/browser/notification_service.h" | 15 #include "content/public/browser/notification_service.h" |
16 #include "content/public/browser/render_process_host.h" | 16 #include "content/public/browser/render_process_host.h" |
17 #include "extensions/features/features.h" | 17 #include "extensions/features/features.h" |
| 18 #include "ppapi/features/features.h" |
18 | 19 |
19 #if BUILDFLAG(ENABLE_EXTENSIONS) | 20 #if BUILDFLAG(ENABLE_EXTENSIONS) |
20 #include "extensions/browser/process_map.h" | 21 #include "extensions/browser/process_map.h" |
21 #endif | 22 #endif |
22 | 23 |
23 #if defined(ENABLE_PLUGINS) | 24 #if BUILDFLAG(ENABLE_PLUGINS) |
24 #include "chrome/browser/metrics/plugin_metrics_provider.h" | 25 #include "chrome/browser/metrics/plugin_metrics_provider.h" |
25 #endif | 26 #endif |
26 | 27 |
27 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
28 #include <windows.h> // Needed for STATUS_* codes | 29 #include <windows.h> // Needed for STATUS_* codes |
29 #include "chrome/common/metrics_constants_util_win.h" | 30 #include "chrome/common/metrics_constants_util_win.h" |
30 #endif | 31 #endif |
31 | 32 |
32 ChromeStabilityMetricsProvider::ChromeStabilityMetricsProvider( | 33 ChromeStabilityMetricsProvider::ChromeStabilityMetricsProvider( |
33 PrefService* local_state) | 34 PrefService* local_state) |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 116 |
116 default: | 117 default: |
117 NOTREACHED(); | 118 NOTREACHED(); |
118 break; | 119 break; |
119 } | 120 } |
120 } | 121 } |
121 | 122 |
122 void ChromeStabilityMetricsProvider::BrowserChildProcessCrashed( | 123 void ChromeStabilityMetricsProvider::BrowserChildProcessCrashed( |
123 const content::ChildProcessData& data, | 124 const content::ChildProcessData& data, |
124 int exit_code) { | 125 int exit_code) { |
125 #if defined(ENABLE_PLUGINS) | 126 #if BUILDFLAG(ENABLE_PLUGINS) |
126 // Exclude plugin crashes from the count below because we report them via | 127 // Exclude plugin crashes from the count below because we report them via |
127 // a separate UMA metric. | 128 // a separate UMA metric. |
128 if (PluginMetricsProvider::IsPluginProcess(data.process_type)) | 129 if (PluginMetricsProvider::IsPluginProcess(data.process_type)) |
129 return; | 130 return; |
130 #endif | 131 #endif |
131 | 132 |
132 helper_.BrowserChildProcessCrashed(); | 133 helper_.BrowserChildProcessCrashed(); |
133 } | 134 } |
OLD | NEW |