| 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/content/app/crash_reporter_client.h" | 5 #include "components/crash/content/app/crash_reporter_client.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" |
| 8 |
| 9 // On Windows don't use FilePath and logging.h. |
| 10 // http://crbug.com/604923 |
| 11 #if !defined(OS_WIN) |
| 7 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 13 #include "base/logging.h" |
| 9 #include "build/build_config.h" | 14 #else |
| 15 #include <assert.h> |
| 16 #define DCHECK assert |
| 17 #endif |
| 10 | 18 |
| 11 namespace crash_reporter { | 19 namespace crash_reporter { |
| 12 | 20 |
| 13 namespace { | 21 namespace { |
| 14 | 22 |
| 15 CrashReporterClient* g_client = NULL; | 23 CrashReporterClient* g_client = NULL; |
| 16 | 24 |
| 17 } // namespace | 25 } // namespace |
| 18 | 26 |
| 19 void SetCrashReporterClient(CrashReporterClient* client) { | 27 void SetCrashReporterClient(CrashReporterClient* client) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 33 const std::string& client_guid) {} | 41 const std::string& client_guid) {} |
| 34 #endif | 42 #endif |
| 35 | 43 |
| 36 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 37 bool CrashReporterClient::ShouldCreatePipeName( | 45 bool CrashReporterClient::ShouldCreatePipeName( |
| 38 const base::string16& process_type) { | 46 const base::string16& process_type) { |
| 39 return process_type == L"browser"; | 47 return process_type == L"browser"; |
| 40 } | 48 } |
| 41 | 49 |
| 42 bool CrashReporterClient::GetAlternativeCrashDumpLocation( | 50 bool CrashReporterClient::GetAlternativeCrashDumpLocation( |
| 43 base::FilePath* crash_dir) { | 51 base::string16* crash_dir) { |
| 44 return false; | 52 return false; |
| 45 } | 53 } |
| 46 | 54 |
| 47 void CrashReporterClient::GetProductNameAndVersion( | 55 void CrashReporterClient::GetProductNameAndVersion( |
| 48 const base::FilePath& exe_path, | 56 const base::string16& exe_path, |
| 49 base::string16* product_name, | 57 base::string16* product_name, |
| 50 base::string16* version, | 58 base::string16* version, |
| 51 base::string16* special_build, | 59 base::string16* special_build, |
| 52 base::string16* channel_name) { | 60 base::string16* channel_name) { |
| 53 } | 61 } |
| 54 | 62 |
| 55 bool CrashReporterClient::ShouldShowRestartDialog(base::string16* title, | 63 bool CrashReporterClient::ShouldShowRestartDialog(base::string16* title, |
| 56 base::string16* message, | 64 base::string16* message, |
| 57 bool* is_rtl_locale) { | 65 bool* is_rtl_locale) { |
| 58 return false; | 66 return false; |
| 59 } | 67 } |
| 60 | 68 |
| 61 bool CrashReporterClient::AboutToRestart() { | 69 bool CrashReporterClient::AboutToRestart() { |
| 62 return false; | 70 return false; |
| 63 } | 71 } |
| 64 | 72 |
| 65 bool CrashReporterClient::GetDeferredUploadsSupported(bool is_per_usr_install) { | 73 bool CrashReporterClient::GetDeferredUploadsSupported( |
| 74 bool is_per_usr_install) { |
| 66 return false; | 75 return false; |
| 67 } | 76 } |
| 68 | 77 |
| 69 bool CrashReporterClient::GetIsPerUserInstall(const base::FilePath& exe_path) { | 78 bool CrashReporterClient::GetIsPerUserInstall(const base::string16& exe_path) { |
| 70 return true; | 79 return true; |
| 71 } | 80 } |
| 72 | 81 |
| 73 bool CrashReporterClient::GetShouldDumpLargerDumps(bool is_per_user_install) { | 82 bool CrashReporterClient::GetShouldDumpLargerDumps(bool is_per_user_install) { |
| 74 return false; | 83 return false; |
| 75 } | 84 } |
| 76 | 85 |
| 77 int CrashReporterClient::GetResultCodeRespawnFailed() { | 86 int CrashReporterClient::GetResultCodeRespawnFailed() { |
| 78 return 0; | 87 return 0; |
| 79 } | 88 } |
| 80 #endif | 89 #endif |
| 81 | 90 |
| 82 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) | 91 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) |
| 83 void CrashReporterClient::GetProductNameAndVersion(const char** product_name, | 92 void CrashReporterClient::GetProductNameAndVersion(const char** product_name, |
| 84 const char** version) { | 93 const char** version) { |
| 85 } | 94 } |
| 86 | 95 |
| 87 base::FilePath CrashReporterClient::GetReporterLogFilename() { | 96 base::FilePath CrashReporterClient::GetReporterLogFilename() { |
| 88 return base::FilePath(); | 97 return base::FilePath(); |
| 89 } | 98 } |
| 90 | 99 |
| 91 bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename) { | 100 bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename) { |
| 92 return false; | 101 return false; |
| 93 } | 102 } |
| 94 #endif | 103 #endif |
| 95 | 104 |
| 105 #if defined(OS_WIN) |
| 106 bool CrashReporterClient::GetCrashDumpLocation(base::string16* crash_dir) { |
| 107 #else |
| 96 bool CrashReporterClient::GetCrashDumpLocation(base::FilePath* crash_dir) { | 108 bool CrashReporterClient::GetCrashDumpLocation(base::FilePath* crash_dir) { |
| 109 #endif |
| 97 return false; | 110 return false; |
| 98 } | 111 } |
| 99 | 112 |
| 100 size_t CrashReporterClient::RegisterCrashKeys() { | 113 size_t CrashReporterClient::RegisterCrashKeys() { |
| 101 return 0; | 114 return 0; |
| 102 } | 115 } |
| 103 | 116 |
| 104 bool CrashReporterClient::IsRunningUnattended() { | 117 bool CrashReporterClient::IsRunningUnattended() { |
| 105 return true; | 118 return true; |
| 106 } | 119 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 134 #endif | 147 #endif |
| 135 } | 148 } |
| 136 #endif | 149 #endif |
| 137 | 150 |
| 138 bool CrashReporterClient::EnableBreakpadForProcess( | 151 bool CrashReporterClient::EnableBreakpadForProcess( |
| 139 const std::string& process_type) { | 152 const std::string& process_type) { |
| 140 return false; | 153 return false; |
| 141 } | 154 } |
| 142 | 155 |
| 143 } // namespace crash_reporter | 156 } // namespace crash_reporter |
| OLD | NEW |