OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "components/browser_watcher/watcher_metrics_provider_win.h" | 5 #include "components/browser_watcher/watcher_metrics_provider_win.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
12 #include <utility> | 12 #include <utility> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/feature_list.h" | 16 #include "base/feature_list.h" |
17 #include "base/metrics/histogram.h" | 17 #include "base/metrics/histogram.h" |
18 #include "base/metrics/histogram_base.h" | 18 #include "base/metrics/histogram_base.h" |
19 #include "base/metrics/histogram_macros.h" | 19 #include "base/metrics/histogram_macros.h" |
20 #include "base/metrics/sparse_histogram.h" | 20 #include "base/metrics/sparse_histogram.h" |
21 #include "base/process/process.h" | 21 #include "base/process/process.h" |
22 #include "base/strings/string_number_conversions.h" | 22 #include "base/strings/string_number_conversions.h" |
23 #include "base/strings/string_piece.h" | 23 #include "base/strings/string_piece.h" |
24 #include "base/strings/utf_string_conversions.h" | 24 #include "base/strings/utf_string_conversions.h" |
25 #include "base/win/registry.h" | 25 #include "base/win/registry.h" |
26 #include "components/browser_watcher/features.h" | 26 #include "components/browser_watcher/features.h" |
27 #include "components/browser_watcher/postmortem_report_collector.h" | 27 #include "components/browser_watcher/postmortem_report_collector.h" |
28 #include "components/browser_watcher/stability_debugging.h" | 28 #include "components/browser_watcher/stability_paths.h" |
29 #include "components/browser_watcher/system_session_analyzer_win.h" | 29 #include "components/browser_watcher/system_session_analyzer_win.h" |
30 #include "third_party/crashpad/crashpad/client/crash_report_database.h" | 30 #include "third_party/crashpad/crashpad/client/crash_report_database.h" |
31 | 31 |
32 namespace browser_watcher { | 32 namespace browser_watcher { |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 // Process ID APIs on Windows talk in DWORDs, whereas for string formatting | 36 // Process ID APIs on Windows talk in DWORDs, whereas for string formatting |
37 // and parsing, this code uses int. In practice there are no process IDs with | 37 // and parsing, this code uses int. In practice there are no process IDs with |
38 // the high bit set on Windows, so there's no danger of overflow if this is | 38 // the high bit set on Windows, so there's no danger of overflow if this is |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 SystemSessionAnalyzer analyzer(kSystemSessionsToInspect); | 273 SystemSessionAnalyzer analyzer(kSystemSessionsToInspect); |
274 PostmortemReportCollector collector( | 274 PostmortemReportCollector collector( |
275 base::UTF16ToUTF8(product_name), base::UTF16ToUTF8(version_number), | 275 base::UTF16ToUTF8(product_name), base::UTF16ToUTF8(version_number), |
276 base::UTF16ToUTF8(channel_name), &analyzer); | 276 base::UTF16ToUTF8(channel_name), &analyzer); |
277 collector.CollectAndSubmitAllPendingReports( | 277 collector.CollectAndSubmitAllPendingReports( |
278 stability_dir, GetStabilityFilePattern(), excluded_debug_files, | 278 stability_dir, GetStabilityFilePattern(), excluded_debug_files, |
279 crashpad_database.get()); | 279 crashpad_database.get()); |
280 } | 280 } |
281 | 281 |
282 } // namespace browser_watcher | 282 } // namespace browser_watcher |
OLD | NEW |