1 // Copyright 2013 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.
5 #ifndef CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_
6 #define CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "components/crash/app/crash_reporter_client.h"
14 class ChromeCrashReporterClient
: public crash_reporter::CrashReporterClient
{
16 ChromeCrashReporterClient();
17 ~ChromeCrashReporterClient() override
;
19 // crash_reporter::CrashReporterClient implementation.
20 void SetCrashReporterClientIdFromGUID(
21 const std::string
& client_guid
) override
;
23 virtual bool GetAlternativeCrashDumpLocation(base::FilePath
* crash_dir
)
25 virtual void GetProductNameAndVersion(const base::FilePath
& exe_path
,
26 base::string16
* product_name
,
27 base::string16
* version
,
28 base::string16
* special_build
,
29 base::string16
* channel_name
) override
;
30 virtual bool ShouldShowRestartDialog(base::string16
* title
,
31 base::string16
* message
,
32 bool* is_rtl_locale
) override
;
33 virtual bool AboutToRestart() override
;
34 virtual bool GetDeferredUploadsSupported(bool is_per_user_install
) override
;
35 virtual bool GetIsPerUserInstall(const base::FilePath
& exe_path
) override
;
36 virtual bool GetShouldDumpLargerDumps(bool is_per_user_install
) override
;
37 virtual int GetResultCodeRespawnFailed() override
;
38 virtual void InitBrowserCrashDumpsRegKey() override
;
39 virtual void RecordCrashDumpAttempt(bool is_real_crash
) override
;
42 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
43 void GetProductNameAndVersion(const char** product_name
,
44 const char** version
) override
;
45 base::FilePath
GetReporterLogFilename() override
;
48 bool GetCrashDumpLocation(base::FilePath
* crash_dir
) override
;
50 size_t RegisterCrashKeys() override
;
52 bool IsRunningUnattended() override
;
54 bool GetCollectStatsConsent() override
;
56 #if defined(OS_WIN) || defined(OS_MACOSX)
57 bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled
) override
;
60 #if defined(OS_ANDROID)
61 virtual int GetAndroidMinidumpDescriptor() override
;
64 #if defined(OS_MACOSX)
65 void InstallAdditionalFilters(BreakpadRef breakpad
) override
;
68 bool EnableBreakpadForProcess(const std::string
& process_type
) override
;
71 DISALLOW_COPY_AND_ASSIGN(ChromeCrashReporterClient
);
76 #endif // CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_