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#include "components/breakpad/breakpad_client.h"
6
7#include "base/files/file_path.h"
8#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
30#if defined(OS_WIN)
31bool BreakpadClient::GetAlternativeCrashDumpLocation(
32    base::FilePath* crash_dir) {
33  return false;
34}
35
36void BreakpadClient::GetProductNameAndVersion(const base::FilePath& exe_path,
37                                              base::string16* product_name,
38                                              base::string16* version,
39                                              base::string16* special_build,
40                                              base::string16* channel_name) {
41}
42
43bool BreakpadClient::ShouldShowRestartDialog(base::string16* title,
44                                             base::string16* message,
45                                             bool* is_rtl_locale) {
46  return false;
47}
48
49bool BreakpadClient::AboutToRestart() {
50  return true;
51}
52
53base::string16 BreakpadClient::GetCrashGUID() {
54  return base::string16();
55}
56
57bool BreakpadClient::GetDeferredUploadsSupported(bool is_per_usr_install) {
58  return false;
59}
60
61bool BreakpadClient::GetIsPerUserInstall(const base::FilePath& exe_path) {
62  return false;
63}
64
65bool BreakpadClient::GetShouldDumpLargerDumps(bool is_per_user_install) {
66  return false;
67}
68
69int BreakpadClient::GetResultCodeRespawnFailed() {
70  return 0;
71}
72#endif
73
74#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
75void BreakpadClient::GetProductNameAndVersion(std::string* product_name,
76                                              std::string* version) {
77}
78
79base::FilePath BreakpadClient::GetReporterLogFilename() {
80  return base::FilePath();
81}
82#endif
83
84bool BreakpadClient::GetCrashDumpLocation(base::FilePath* crash_dir) {
85  return false;
86}
87
88#if defined(OS_POSIX)
89void BreakpadClient::SetDumpWithoutCrashingFunction(void (*function)()) {
90}
91#endif
92
93size_t BreakpadClient::RegisterCrashKeys() {
94  return 0;
95}
96
97bool BreakpadClient::IsRunningUnattended() {
98  return false;
99}
100
101#if defined(OS_WIN) || defined(OS_MACOSX)
102bool BreakpadClient::GetCollectStatsConsent() {
103  return false;
104}
105#endif
106
107#if defined(OS_ANDROID)
108int BreakpadClient::GetAndroidMinidumpDescriptor() {
109  return 0;
110}
111#endif
112
113#if defined(OS_MACOSX)
114void BreakpadClient::InstallAdditionalFilters(BreakpadRef breakpad) {
115}
116#endif
117
118}  // namespace breakpad
119