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

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

Issue 10824166: Cleaned up usage of std::wstring in src/remoting. Added presubmit warning supressions for the reman… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback Created 8 years, 4 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
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/Chrome Frame crash reporting 6 // handler. This implementation is based on Chrome/Chrome Frame crash reporting
7 // code. See: 7 // code. See:
8 // - src/chrome/app/breakpad_win.cc 8 // - src/chrome/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
146 return &g_instance.Get(); 146 return &g_instance.Get();
147 } 147 }
148 148
149 // Returns the Custom information to be used for crash reporting. 149 // Returns the Custom information to be used for crash reporting.
150 google_breakpad::CustomClientInfo* BreakpadWin::GetCustomInfo() { 150 google_breakpad::CustomClientInfo* BreakpadWin::GetCustomInfo() {
151 HMODULE binary = base::GetModuleFromAddress( 151 HMODULE binary = base::GetModuleFromAddress(
152 reinterpret_cast<void*>(&remoting::InitializeCrashReporting)); 152 reinterpret_cast<void*>(&remoting::InitializeCrashReporting));
153 scoped_ptr<FileVersionInfo> version_info( 153 scoped_ptr<FileVersionInfo> version_info(
154 FileVersionInfo::CreateFileVersionInfoForModule(binary)); 154 FileVersionInfo::CreateFileVersionInfoForModule(binary));
155 155
156 // presubmit: allow wstring
156 std::wstring version; 157 std::wstring version;
157 if (version_info.get()) 158 if (version_info.get())
158 version = UTF16ToWide(version_info->product_version()); 159 version = UTF16ToWide(version_info->product_version());
Wez 2012/08/06 18:33:18 Here.
alexeypa (please no reviews) 2012/08/06 19:31:54 UTF16ToWide is used here because CustomInfoEntry r
159 if (version.empty()) 160 if (version.empty())
160 version = kBreakpadVersionDefault; 161 version = kBreakpadVersionDefault;
161 162
162 static google_breakpad::CustomInfoEntry ver_entry( 163 static google_breakpad::CustomInfoEntry ver_entry(
163 kBreakpadVersionEntry, version.c_str()); 164 kBreakpadVersionEntry, version.c_str());
164 static google_breakpad::CustomInfoEntry prod_entry( 165 static google_breakpad::CustomInfoEntry prod_entry(
165 kBreakpadProdEntry, kBreakpadProductName); 166 kBreakpadProdEntry, kBreakpadProductName);
166 static google_breakpad::CustomInfoEntry plat_entry( 167 static google_breakpad::CustomInfoEntry plat_entry(
167 kBreakpadPlatformEntry, kBreakpadPlatformWin32); 168 kBreakpadPlatformEntry, kBreakpadPlatformWin32);
168 static google_breakpad::CustomInfoEntry entries[] = { 169 static google_breakpad::CustomInfoEntry entries[] = {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // Touch the object to make sure it is initialized. 205 // Touch the object to make sure it is initialized.
205 BreakpadWin::GetInstance(); 206 BreakpadWin::GetInstance();
206 } 207 }
207 208
208 void InitializeCrashReportingForTest(const wchar_t* pipe_name) { 209 void InitializeCrashReportingForTest(const wchar_t* pipe_name) {
209 BreakpadWin::pipe_name_ = pipe_name; 210 BreakpadWin::pipe_name_ = pipe_name;
210 InitializeCrashReporting(); 211 InitializeCrashReporting();
211 } 212 }
212 213
213 } // namespace remoting 214 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698