- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / app / chrome_breakpad_client.h
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.
4
5 #ifndef CHROME_APP_CHROME_BREAKPAD_CLIENT_H_
6 #define CHROME_APP_CHROME_BREAKPAD_CLIENT_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "components/breakpad/app/breakpad_client.h"
11
12 namespace chrome {
13
14 class ChromeBreakpadClient : public breakpad::BreakpadClient {
15  public:
16   ChromeBreakpadClient();
17   virtual ~ChromeBreakpadClient();
18
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
40
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
46
47   virtual bool GetCrashDumpLocation(base::FilePath* crash_dir) OVERRIDE;
48
49 #if defined(OS_POSIX)
50   virtual void SetDumpWithoutCrashingFunction(void (*function)()) OVERRIDE;
51 #endif
52
53   virtual size_t RegisterCrashKeys() OVERRIDE;
54
55   virtual bool IsRunningUnattended() OVERRIDE;
56
57 #if defined(OS_WIN) || defined(OS_MACOSX)
58   virtual bool GetCollectStatsConsent() OVERRIDE;
59
60   virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) OVERRIDE;
61 #endif
62
63 #if defined(OS_ANDROID)
64   virtual int GetAndroidMinidumpDescriptor() OVERRIDE;
65 #endif
66
67 #if defined(OS_MACOSX)
68   virtual void InstallAdditionalFilters(BreakpadRef breakpad) OVERRIDE;
69 #endif
70
71  private:
72   DISALLOW_COPY_AND_ASSIGN(ChromeBreakpadClient);
73 };
74
75 }  // namespace chrome
76
77 #endif  // CHROME_APP_CHROME_BREAKPAD_CLIENT_H_