| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/crash/app/crash_reporter_client.h" | 5 #include "components/crash/app/crash_reporter_client.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 | 9 |
| 10 namespace crash_reporter { | 10 namespace crash_reporter { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 CrashReporterClient* g_client = NULL; | 14 CrashReporterClient* g_client = NULL; |
| 15 | 15 |
| 16 } // namespace | 16 } // namespace |
| 17 | 17 |
| 18 void SetCrashReporterClient(CrashReporterClient* client) { | 18 void SetCrashReporterClient(CrashReporterClient* client) { |
| 19 g_client = client; | 19 g_client = client; |
| 20 } | 20 } |
| 21 | 21 |
| 22 CrashReporterClient* GetCrashReporterClient() { | 22 CrashReporterClient* GetCrashReporterClient() { |
| 23 DCHECK(g_client); | 23 DCHECK(g_client); |
| 24 return g_client; | 24 return g_client; |
| 25 } | 25 } |
| 26 | 26 |
| 27 CrashReporterClient::CrashReporterClient() {} | 27 CrashReporterClient::CrashReporterClient() {} |
| 28 CrashReporterClient::~CrashReporterClient() {} | 28 CrashReporterClient::~CrashReporterClient() {} |
| 29 | 29 |
| 30 #if !defined(OS_MACOSX) |
| 30 void CrashReporterClient::SetCrashReporterClientIdFromGUID( | 31 void CrashReporterClient::SetCrashReporterClientIdFromGUID( |
| 31 const std::string& client_guid) { | 32 const std::string& client_guid) { |
| 32 } | 33 } |
| 34 #endif |
| 33 | 35 |
| 34 #if defined(OS_WIN) | 36 #if defined(OS_WIN) |
| 35 bool CrashReporterClient::GetAlternativeCrashDumpLocation( | 37 bool CrashReporterClient::GetAlternativeCrashDumpLocation( |
| 36 base::FilePath* crash_dir) { | 38 base::FilePath* crash_dir) { |
| 37 return false; | 39 return false; |
| 38 } | 40 } |
| 39 | 41 |
| 40 void CrashReporterClient::GetProductNameAndVersion( | 42 void CrashReporterClient::GetProductNameAndVersion( |
| 41 const base::FilePath& exe_path, | 43 const base::FilePath& exe_path, |
| 42 base::string16* product_name, | 44 base::string16* product_name, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // on Android we attach a secondary crash handler which serializes a reduced | 129 // on Android we attach a secondary crash handler which serializes a reduced |
| 128 // form of logcat on the console. | 130 // form of logcat on the console. |
| 129 #if defined(NO_UNWIND_TABLES) | 131 #if defined(NO_UNWIND_TABLES) |
| 130 return true; | 132 return true; |
| 131 #else | 133 #else |
| 132 return false; | 134 return false; |
| 133 #endif | 135 #endif |
| 134 } | 136 } |
| 135 #endif | 137 #endif |
| 136 | 138 |
| 137 #if defined(OS_MACOSX) | |
| 138 void CrashReporterClient::InstallAdditionalFilters(BreakpadRef breakpad) { | |
| 139 } | |
| 140 #endif | |
| 141 | |
| 142 bool CrashReporterClient::EnableBreakpadForProcess( | 139 bool CrashReporterClient::EnableBreakpadForProcess( |
| 143 const std::string& process_type) { | 140 const std::string& process_type) { |
| 144 return false; | 141 return false; |
| 145 } | 142 } |
| 146 | 143 |
| 147 } // namespace crash_reporter | 144 } // namespace crash_reporter |
| OLD | NEW |