Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: remoting/base/breakpad_win.cc

Issue 299363002: Cleanup: Get rid of unneeded base::UTF16ToWide() conversions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/printing_context_win.cc ('k') | ui/shell_dialogs/select_file_dialog_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 crash reporting code. See: 6 // handler. This implementation is based on Chrome crash reporting code. See:
7 // - src/components/breakpad/app/breakpad_win.cc 7 // - src/components/breakpad/app/breakpad_win.cc
8 // - src/chrome/installer/setup/setup_main.cc 8 // - src/chrome/installer/setup/setup_main.cc
9 9
10 #include "remoting/base/breakpad.h" 10 #include "remoting/base/breakpad.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 // Returns the Custom information to be used for crash reporting. 144 // Returns the Custom information to be used for crash reporting.
145 google_breakpad::CustomClientInfo* BreakpadWin::GetCustomInfo() { 145 google_breakpad::CustomClientInfo* BreakpadWin::GetCustomInfo() {
146 HMODULE binary = base::GetModuleFromAddress( 146 HMODULE binary = base::GetModuleFromAddress(
147 reinterpret_cast<void*>(&remoting::InitializeCrashReporting)); 147 reinterpret_cast<void*>(&remoting::InitializeCrashReporting));
148 scoped_ptr<FileVersionInfo> version_info( 148 scoped_ptr<FileVersionInfo> version_info(
149 FileVersionInfo::CreateFileVersionInfoForModule(binary)); 149 FileVersionInfo::CreateFileVersionInfoForModule(binary));
150 150
151 static wchar_t version[64]; 151 static wchar_t version[64];
152 if (version_info.get()) { 152 if (version_info.get()) {
153 wcscpy_s(version, 153 wcscpy_s(version, version_info->product_version().c_str());
154 base::UTF16ToWide(version_info->product_version()).c_str());
155 } else { 154 } else {
156 wcscpy_s(version, kBreakpadVersionDefault); 155 wcscpy_s(version, kBreakpadVersionDefault);
157 } 156 }
158 157
159 static google_breakpad::CustomInfoEntry ver_entry( 158 static google_breakpad::CustomInfoEntry ver_entry(
160 kBreakpadVersionEntry, version); 159 kBreakpadVersionEntry, version);
161 static google_breakpad::CustomInfoEntry prod_entry( 160 static google_breakpad::CustomInfoEntry prod_entry(
162 kBreakpadProdEntry, kBreakpadProductName); 161 kBreakpadProdEntry, kBreakpadProductName);
163 static google_breakpad::CustomInfoEntry plat_entry( 162 static google_breakpad::CustomInfoEntry plat_entry(
164 kBreakpadPlatformEntry, kBreakpadPlatformWin32); 163 kBreakpadPlatformEntry, kBreakpadPlatformWin32);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Touch the object to make sure it is initialized. 200 // Touch the object to make sure it is initialized.
202 BreakpadWin::GetInstance(); 201 BreakpadWin::GetInstance();
203 } 202 }
204 203
205 void InitializeCrashReportingForTest(const wchar_t* pipe_name) { 204 void InitializeCrashReportingForTest(const wchar_t* pipe_name) {
206 BreakpadWin::pipe_name_ = pipe_name; 205 BreakpadWin::pipe_name_ = pipe_name;
207 InitializeCrashReporting(); 206 InitializeCrashReporting();
208 } 207 }
209 208
210 } // namespace remoting 209 } // namespace remoting
OLDNEW
« no previous file with comments | « printing/printing_context_win.cc ('k') | ui/shell_dialogs/select_file_dialog_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698