Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / chrome / app / chrome_crash_reporter_client.h
blob26a6d2b84f9e30f4b345fa3ce42dde21d4e98e1f
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 "base/memory/scoped_ptr.h"
11 #include "components/crash/content/app/crash_reporter_client.h"
13 namespace browser_watcher {
14 class CrashReportingMetrics;
15 } // namespace browser_watcher
17 class ChromeCrashReporterClient : public crash_reporter::CrashReporterClient {
18 public:
19 ChromeCrashReporterClient();
20 ~ChromeCrashReporterClient() override;
22 // crash_reporter::CrashReporterClient implementation.
23 #if !defined(OS_MACOSX)
24 void SetCrashReporterClientIdFromGUID(
25 const std::string& client_guid) override;
26 #endif
27 #if defined(OS_WIN)
28 bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir) override;
29 void GetProductNameAndVersion(const base::FilePath& exe_path,
30 base::string16* product_name,
31 base::string16* version,
32 base::string16* special_build,
33 base::string16* channel_name) override;
34 bool ShouldShowRestartDialog(base::string16* title,
35 base::string16* message,
36 bool* is_rtl_locale) override;
37 bool AboutToRestart() override;
38 bool GetDeferredUploadsSupported(bool is_per_user_install) override;
39 bool GetIsPerUserInstall(const base::FilePath& exe_path) override;
40 bool GetShouldDumpLargerDumps(bool is_per_user_install) override;
41 int GetResultCodeRespawnFailed() override;
42 void InitBrowserCrashDumpsRegKey() override;
43 void RecordCrashDumpAttempt(bool is_real_crash) override;
44 void RecordCrashDumpAttemptResult(bool is_real_crash,
45 bool succeeded) override;
46 #endif
48 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
49 void GetProductNameAndVersion(const char** product_name,
50 const char** version) override;
51 base::FilePath GetReporterLogFilename() override;
52 #endif
54 bool GetCrashDumpLocation(base::FilePath* crash_dir) override;
56 size_t RegisterCrashKeys() override;
58 bool IsRunningUnattended() override;
60 bool GetCollectStatsConsent() override;
62 #if defined(OS_WIN) || defined(OS_MACOSX)
63 bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override;
64 #endif
66 #if defined(OS_ANDROID)
67 int GetAndroidMinidumpDescriptor() override;
68 #endif
70 bool EnableBreakpadForProcess(const std::string& process_type) override;
72 private:
73 #if defined(OS_WIN)
74 scoped_ptr<browser_watcher::CrashReportingMetrics> crash_reporting_metrics_;
75 #endif
77 DISALLOW_COPY_AND_ASSIGN(ChromeCrashReporterClient);
80 #endif // CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_