Remove EWK_BRINGUPS for M120 #3
[platform/framework/web/chromium-efl.git] / chrome / app / chrome_crash_reporter_client.h
1 // Copyright 2013 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.
4
5 #ifndef CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_
6 #define CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_
7
8 #include "build/build_config.h"
9 #include "build/chromeos_buildflags.h"
10
11 #if !BUILDFLAG(IS_WIN)
12
13 #include <memory>
14
15 #include "base/no_destructor.h"
16 #include "components/crash/core/app/crash_reporter_client.h"
17
18 class ChromeCrashReporterClient : public crash_reporter::CrashReporterClient {
19  public:
20   static void Create();
21
22   ChromeCrashReporterClient(const ChromeCrashReporterClient&) = delete;
23   ChromeCrashReporterClient& operator=(const ChromeCrashReporterClient&) =
24       delete;
25
26 #if BUILDFLAG(IS_CHROMEOS_ASH)
27   // If true, processes of this type should pass crash-loop-before down to the
28   // crash reporter and to their children (if the children's type is a process
29   // type that wants crash-loop-before).
30   static bool ShouldPassCrashLoopBefore(const std::string& process_type);
31 #endif
32
33   // crash_reporter::CrashReporterClient implementation.
34 #if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID)
35   void SetCrashReporterClientIdFromGUID(
36       const std::string& client_guid) override;
37 #endif
38
39 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
40   void GetProductNameAndVersion(const char** product_name,
41                                 const char** version) override;
42   void GetProductNameAndVersion(std::string* product_name,
43                                 std::string* version,
44                                 std::string* channel) override;
45   base::FilePath GetReporterLogFilename() override;
46
47   bool GetShouldDumpLargerDumps() override;
48 #endif
49
50   bool GetCrashDumpLocation(base::FilePath* crash_dir) override;
51
52 #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
53   bool GetCrashMetricsLocation(base::FilePath* metrics_dir) override;
54 #endif
55
56   bool IsRunningUnattended() override;
57
58   bool GetCollectStatsConsent() override;
59
60 #if BUILDFLAG(IS_MAC)
61   bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override;
62 #endif
63
64 #if BUILDFLAG(IS_ANDROID)
65   int GetAndroidMinidumpDescriptor() override;
66 #endif
67
68 #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
69   bool ShouldMonitorCrashHandlerExpensively() override;
70 #endif
71
72   bool EnableBreakpadForProcess(const std::string& process_type) override;
73
74  private:
75   friend class base::NoDestructor<ChromeCrashReporterClient>;
76
77   ChromeCrashReporterClient();
78   ~ChromeCrashReporterClient() override;
79 };
80
81 #endif  // BUILDFLAG(IS_WIN)
82
83 #endif  // CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_