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

Side by Side Diff: components/browser_watcher/crash_reporting_metrics_win.h

Issue 1922473003: Scrub the vestigal breakpad crash dump attempts metrics code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Greg's comments. Created 4 years, 7 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_BROWSER_WATCHER_CRASH_REPORTING_METRICS_WIN_H_
6 #define COMPONENTS_BROWSER_WATCHER_CRASH_REPORTING_METRICS_WIN_H_
7
8 #include "base/strings/string16.h"
9
10 namespace browser_watcher {
11
12 // Stores and retrieves metrics related to crash dump attempts.
13 class CrashReportingMetrics {
14 public:
15 // Represents the currently stored metrics.
16 struct Values {
17 // A count of crash dump attempts.
18 int crash_dump_attempts;
19 // A count of successful crash dump attempts.
20 int successful_crash_dumps;
21 // A count of failed crash dump attempts.
22 int failed_crash_dumps;
23 // A count of dump without crash attempts.
24 int dump_without_crash_attempts;
25 // A count of successful dump without crash attempts.
26 int successful_dumps_without_crash;
27 // A count of failed dump without crash attempts.
28 int failed_dumps_without_crash;
29 };
30
31 // Instantiates an instance that will store and retrieve its metrics from
32 // |registry_path|.
33 explicit CrashReportingMetrics(const base::string16& registry_path);
34
35 // Records that a crash dump is being attempted.
36 void RecordCrashDumpAttempt();
37
38 // Records that a dump without crash is being attempted.
39 void RecordDumpWithoutCrashAttempt();
40
41 // Records the result of a crash dump attempt.
42 void RecordCrashDumpAttemptResult(bool succeeded);
43
44 // Records the result of a dump without crash attempt.
45 void RecordDumpWithoutCrashAttemptResult(bool succeeded);
46
47 // Returns the currently stored metrics and resets them to 0.
48 Values RetrieveAndResetMetrics();
49
50 private:
51 base::string16 registry_path_;
52 };
53
54 } // namespace browser_watcher
55
56 #endif // COMPONENTS_BROWSER_WATCHER_CRASH_REPORTING_METRICS_WIN_H_
OLDNEW
« no previous file with comments | « components/browser_watcher/BUILD.gn ('k') | components/browser_watcher/crash_reporting_metrics_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698