1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_WIN_H_
6 #define CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_WIN_H_
8 #include "components/crash/core/app/crash_reporter_client.h"
10 class ChromeCrashReporterClient : public crash_reporter::CrashReporterClient {
12 #if !defined(NACL_WIN64)
13 // Instantiates a process wide instance of the ChromeCrashReporterClient
14 // class and initializes crash reporting for the process. The instance is
16 static void InitializeCrashReportingForProcess();
17 #endif // !defined(NACL_WIN64)
19 ChromeCrashReporterClient();
21 ChromeCrashReporterClient(const ChromeCrashReporterClient&) = delete;
22 ChromeCrashReporterClient& operator=(const ChromeCrashReporterClient&) =
25 ~ChromeCrashReporterClient() override;
27 // crash_reporter::CrashReporterClient implementation.
28 bool GetAlternativeCrashDumpLocation(std::wstring* crash_dir) override;
29 void GetProductNameAndVersion(const std::wstring& exe_path,
30 std::wstring* product_name,
31 std::wstring* version,
32 std::wstring* special_build,
33 std::wstring* channel_name) override;
34 bool ShouldShowRestartDialog(std::wstring* title,
35 std::wstring* message,
36 bool* is_rtl_locale) override;
37 bool AboutToRestart() override;
38 bool GetIsPerUserInstall() override;
39 bool GetShouldDumpLargerDumps() override;
40 int GetResultCodeRespawnFailed() override;
42 bool GetCrashDumpLocation(std::wstring* crash_dir) override;
43 bool GetCrashMetricsLocation(std::wstring* metrics_dir) override;
45 bool IsRunningUnattended() override;
47 bool GetCollectStatsConsent() override;
49 bool GetCollectStatsInSample() override;
51 bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override;
53 bool ShouldMonitorCrashHandlerExpensively() override;
55 bool EnableBreakpadForProcess(const std::string& process_type) override;
57 std::wstring GetWerRuntimeExceptionModule() override;
60 #endif // CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_WIN_H_