Add ICU message format support
[chromium-blink-merge.git] / chrome / app / chrome_crash_reporter_client.h
blobebc1dd9918377b81e8b16260ada6a48aa2c067a1
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/app/crash_reporter_client.h"
13 namespace browser_watcher {
14 class CrashReportingMetrics;
15 } // namespace browser_watcher
17 namespace chrome {
19 class ChromeCrashReporterClient : public crash_reporter::CrashReporterClient {
20 public:
21 ChromeCrashReporterClient();
22 ~ChromeCrashReporterClient() override;
24 // crash_reporter::CrashReporterClient implementation.
25 #if !defined(OS_MACOSX)
26 void SetCrashReporterClientIdFromGUID(
27 const std::string& client_guid) override;
28 #endif
29 #if defined(OS_WIN)
30 bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir) override;
31 void GetProductNameAndVersion(const base::FilePath& exe_path,
32 base::string16* product_name,
33 base::string16* version,
34 base::string16* special_build,
35 base::string16* channel_name) override;
36 bool ShouldShowRestartDialog(base::string16* title,
37 base::string16* message,
38 bool* is_rtl_locale) override;
39 bool AboutToRestart() override;
40 bool GetDeferredUploadsSupported(bool is_per_user_install) override;
41 bool GetIsPerUserInstall(const base::FilePath& exe_path) override;
42 bool GetShouldDumpLargerDumps(bool is_per_user_install) override;
43 int GetResultCodeRespawnFailed() override;
44 void InitBrowserCrashDumpsRegKey() override;
45 void RecordCrashDumpAttempt(bool is_real_crash) override;
46 void RecordCrashDumpAttemptResult(bool is_real_crash,
47 bool succeeded) override;
48 #endif
50 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
51 void GetProductNameAndVersion(const char** product_name,
52 const char** version) override;
53 base::FilePath GetReporterLogFilename() override;
54 #endif
56 bool GetCrashDumpLocation(base::FilePath* crash_dir) override;
58 size_t RegisterCrashKeys() override;
60 bool IsRunningUnattended() override;
62 bool GetCollectStatsConsent() override;
64 #if defined(OS_WIN) || defined(OS_MACOSX)
65 bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override;
66 #endif
68 #if defined(OS_ANDROID)
69 int GetAndroidMinidumpDescriptor() override;
70 #endif
72 bool EnableBreakpadForProcess(const std::string& process_type) override;
74 private:
75 #if defined(OS_WIN)
76 scoped_ptr<browser_watcher::CrashReportingMetrics> crash_reporting_metrics_;
77 #endif
79 DISALLOW_COPY_AND_ASSIGN(ChromeCrashReporterClient);
82 } // namespace chrome
84 #endif // CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_