| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This module contains the necessary code to register the Breakpad exception | 5 // This module contains the necessary code to register the Breakpad exception |
| 6 // handler. This implementation is based on Chrome/Chrome Frame crash reporting | 6 // handler. This implementation is based on Chrome/Chrome Frame crash reporting |
| 7 // code. See: | 7 // code. See: |
| 8 // - src/components/breakpad/app/breakpad_win.cc | 8 // - src/components/breakpad/app/breakpad_win.cc |
| 9 // - src/chrome_frame/crash_server_init.cc | 9 // - src/chrome_frame/crash_server_init.cc |
| 10 // - src/chrome/installer/setup/setup_main.cc | 10 // - src/chrome/installer/setup/setup_main.cc |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 // Returns the Custom information to be used for crash reporting. | 147 // Returns the Custom information to be used for crash reporting. |
| 148 google_breakpad::CustomClientInfo* BreakpadWin::GetCustomInfo() { | 148 google_breakpad::CustomClientInfo* BreakpadWin::GetCustomInfo() { |
| 149 HMODULE binary = base::GetModuleFromAddress( | 149 HMODULE binary = base::GetModuleFromAddress( |
| 150 reinterpret_cast<void*>(&remoting::InitializeCrashReporting)); | 150 reinterpret_cast<void*>(&remoting::InitializeCrashReporting)); |
| 151 scoped_ptr<FileVersionInfo> version_info( | 151 scoped_ptr<FileVersionInfo> version_info( |
| 152 FileVersionInfo::CreateFileVersionInfoForModule(binary)); | 152 FileVersionInfo::CreateFileVersionInfoForModule(binary)); |
| 153 | 153 |
| 154 static wchar_t version[64]; | 154 static wchar_t version[64]; |
| 155 if (version_info.get()) { | 155 if (version_info.get()) { |
| 156 wcscpy_s(version, UTF16ToWide(version_info->product_version()).c_str()); | 156 wcscpy_s(version, |
| 157 base::UTF16ToWide(version_info->product_version()).c_str()); |
| 157 } else { | 158 } else { |
| 158 wcscpy_s(version, kBreakpadVersionDefault); | 159 wcscpy_s(version, kBreakpadVersionDefault); |
| 159 } | 160 } |
| 160 | 161 |
| 161 static google_breakpad::CustomInfoEntry ver_entry( | 162 static google_breakpad::CustomInfoEntry ver_entry( |
| 162 kBreakpadVersionEntry, version); | 163 kBreakpadVersionEntry, version); |
| 163 static google_breakpad::CustomInfoEntry prod_entry( | 164 static google_breakpad::CustomInfoEntry prod_entry( |
| 164 kBreakpadProdEntry, kBreakpadProductName); | 165 kBreakpadProdEntry, kBreakpadProductName); |
| 165 static google_breakpad::CustomInfoEntry plat_entry( | 166 static google_breakpad::CustomInfoEntry plat_entry( |
| 166 kBreakpadPlatformEntry, kBreakpadPlatformWin32); | 167 kBreakpadPlatformEntry, kBreakpadPlatformWin32); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // Touch the object to make sure it is initialized. | 204 // Touch the object to make sure it is initialized. |
| 204 BreakpadWin::GetInstance(); | 205 BreakpadWin::GetInstance(); |
| 205 } | 206 } |
| 206 | 207 |
| 207 void InitializeCrashReportingForTest(const wchar_t* pipe_name) { | 208 void InitializeCrashReportingForTest(const wchar_t* pipe_name) { |
| 208 BreakpadWin::pipe_name_ = pipe_name; | 209 BreakpadWin::pipe_name_ = pipe_name; |
| 209 InitializeCrashReporting(); | 210 InitializeCrashReporting(); |
| 210 } | 211 } |
| 211 | 212 |
| 212 } // namespace remoting | 213 } // namespace remoting |
| OLD | NEW |