blob: 26ba755335f7f326d0a2db9ba8730596beed302d [file] [log] [blame]
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01001// 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#include "components/breakpad/breakpad_client.h"
6
Ben Murdocha3f7b4e2013-07-24 10:36:34 +01007#include "base/files/file_path.h"
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01008#include "base/logging.h"
9
10namespace breakpad {
11
12namespace {
13
14BreakpadClient* g_client = NULL;
15
16} // namespace
17
18void SetBreakpadClient(BreakpadClient* client) {
19 g_client = client;
20}
21
22BreakpadClient* GetBreakpadClient() {
23 DCHECK(g_client);
24 return g_client;
25}
26
27BreakpadClient::BreakpadClient() {}
28BreakpadClient::~BreakpadClient() {}
29
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +010030void BreakpadClient::SetClientID(const std::string& client_id) {
31}
32
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010033#if defined(OS_WIN)
34bool BreakpadClient::GetAlternativeCrashDumpLocation(
35 base::FilePath* crash_dir) {
36 return false;
37}
Ben Murdochca12bfa2013-07-23 11:17:05 +010038
39void BreakpadClient::GetProductNameAndVersion(const base::FilePath& exe_path,
40 base::string16* product_name,
41 base::string16* version,
Ben Murdocha3f7b4e2013-07-24 10:36:34 +010042 base::string16* special_build,
43 base::string16* channel_name) {
Ben Murdochca12bfa2013-07-23 11:17:05 +010044}
45
46bool BreakpadClient::ShouldShowRestartDialog(base::string16* title,
47 base::string16* message,
48 bool* is_rtl_locale) {
49 return false;
50}
51
52bool BreakpadClient::AboutToRestart() {
53 return true;
54}
Ben Murdocha3f7b4e2013-07-24 10:36:34 +010055
Ben Murdocha3f7b4e2013-07-24 10:36:34 +010056bool BreakpadClient::GetDeferredUploadsSupported(bool is_per_usr_install) {
57 return false;
58}
59
60bool BreakpadClient::GetIsPerUserInstall(const base::FilePath& exe_path) {
61 return false;
62}
63
64bool BreakpadClient::GetShouldDumpLargerDumps(bool is_per_user_install) {
65 return false;
66}
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +010067
68int BreakpadClient::GetResultCodeRespawnFailed() {
69 return 0;
70}
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +010071
72void BreakpadClient::InitBrowserCrashDumpsRegKey() {
73}
74
75void BreakpadClient::RecordCrashDumpAttempt(bool is_real_crash) {
76}
Ben Murdochca12bfa2013-07-23 11:17:05 +010077#endif
78
79#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
80void BreakpadClient::GetProductNameAndVersion(std::string* product_name,
81 std::string* version) {
82}
Ben Murdocha3f7b4e2013-07-24 10:36:34 +010083
84base::FilePath BreakpadClient::GetReporterLogFilename() {
85 return base::FilePath();
86}
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010087#endif
88
89bool BreakpadClient::GetCrashDumpLocation(base::FilePath* crash_dir) {
90 return false;
91}
92
Ben Murdoch9ab55632013-07-18 11:57:30 +010093#if defined(OS_POSIX)
94void BreakpadClient::SetDumpWithoutCrashingFunction(void (*function)()) {
95}
96#endif
97
Ben Murdochca12bfa2013-07-23 11:17:05 +010098size_t BreakpadClient::RegisterCrashKeys() {
99 return 0;
100}
101
102bool BreakpadClient::IsRunningUnattended() {
103 return false;
104}
105
Ben Murdocha3f7b4e2013-07-24 10:36:34 +0100106#if defined(OS_WIN) || defined(OS_MACOSX)
107bool BreakpadClient::GetCollectStatsConsent() {
108 return false;
109}
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100110
111bool BreakpadClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
112 return false;
113}
Ben Murdocha3f7b4e2013-07-24 10:36:34 +0100114#endif
115
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +0100116#if defined(OS_ANDROID)
117int BreakpadClient::GetAndroidMinidumpDescriptor() {
118 return 0;
119}
120#endif
121
122#if defined(OS_MACOSX)
123void BreakpadClient::InstallAdditionalFilters(BreakpadRef breakpad) {
124}
125#endif
126
Ben Murdoch7dbb3d52013-07-17 14:55:54 +0100127} // namespace breakpad