Fix crash during shutdown caused by content verification code
[chromium-blink-merge.git] / chrome / app / chrome_breakpad_client.h
blob489e8fe512b0bd480dcb811f5bfe4e9443be6670
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_BREAKPAD_CLIENT_H_
6 #define CHROME_APP_CHROME_BREAKPAD_CLIENT_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "components/breakpad/app/breakpad_client.h"
12 namespace chrome {
14 class ChromeBreakpadClient : public breakpad::BreakpadClient {
15 public:
16 ChromeBreakpadClient();
17 virtual ~ChromeBreakpadClient();
19 // breakpad::BreakpadClient implementation.
20 virtual void SetClientID(const std::string& client_id) OVERRIDE;
21 #if defined(OS_WIN)
22 virtual bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir)
23 OVERRIDE;
24 virtual void GetProductNameAndVersion(const base::FilePath& exe_path,
25 base::string16* product_name,
26 base::string16* version,
27 base::string16* special_build,
28 base::string16* channel_name) OVERRIDE;
29 virtual bool ShouldShowRestartDialog(base::string16* title,
30 base::string16* message,
31 bool* is_rtl_locale) OVERRIDE;
32 virtual bool AboutToRestart() OVERRIDE;
33 virtual bool GetDeferredUploadsSupported(bool is_per_user_install) OVERRIDE;
34 virtual bool GetIsPerUserInstall(const base::FilePath& exe_path) OVERRIDE;
35 virtual bool GetShouldDumpLargerDumps(bool is_per_user_install) OVERRIDE;
36 virtual int GetResultCodeRespawnFailed() OVERRIDE;
37 virtual void InitBrowserCrashDumpsRegKey() OVERRIDE;
38 virtual void RecordCrashDumpAttempt(bool is_real_crash) OVERRIDE;
39 #endif
41 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
42 virtual void GetProductNameAndVersion(std::string* product_name,
43 std::string* version) OVERRIDE;
44 virtual base::FilePath GetReporterLogFilename() OVERRIDE;
45 #endif
47 virtual bool GetCrashDumpLocation(base::FilePath* crash_dir) OVERRIDE;
49 virtual size_t RegisterCrashKeys() OVERRIDE;
51 virtual bool IsRunningUnattended() OVERRIDE;
53 virtual bool GetCollectStatsConsent() OVERRIDE;
55 #if defined(OS_WIN) || defined(OS_MACOSX)
56 virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) OVERRIDE;
57 #endif
59 #if defined(OS_ANDROID)
60 virtual int GetAndroidMinidumpDescriptor() OVERRIDE;
61 #endif
63 #if defined(OS_MACOSX)
64 virtual void InstallAdditionalFilters(BreakpadRef breakpad) OVERRIDE;
65 #endif
67 virtual bool EnableBreakpadForProcess(
68 const std::string& process_type) OVERRIDE;
70 private:
71 DISALLOW_COPY_AND_ASSIGN(ChromeBreakpadClient);
74 } // namespace chrome
76 #endif // CHROME_APP_CHROME_BREAKPAD_CLIENT_H_