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

Side by Side Diff: components/crash/app/breakpad_win.cc

Issue 1255073002: clang/win: Fix most -Wunused-function warnings in Chromium code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac Created 5 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
OLDNEW
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/breakpad_win.h" 5 #include "components/crash/app/breakpad_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <tchar.h> 9 #include <tchar.h>
10 #include <userenv.h> 10 #include <userenv.h>
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 } 280 }
281 281
282 // Exception filter for the service process used when breakpad is not enabled. 282 // Exception filter for the service process used when breakpad is not enabled.
283 // We just display the "Do you want to restart" message and then die 283 // We just display the "Do you want to restart" message and then die
284 // (without calling the previous filter). 284 // (without calling the previous filter).
285 long WINAPI ServiceExceptionFilter(EXCEPTION_POINTERS* info) { 285 long WINAPI ServiceExceptionFilter(EXCEPTION_POINTERS* info) {
286 DumpDoneCallback(NULL, NULL, NULL, info, NULL, false); 286 DumpDoneCallback(NULL, NULL, NULL, info, NULL, false);
287 return EXCEPTION_EXECUTE_HANDLER; 287 return EXCEPTION_EXECUTE_HANDLER;
288 } 288 }
289 289
290 #if !defined(COMPONENT_BUILD)
290 // Installed via base::debug::SetCrashKeyReportingFunctions. 291 // Installed via base::debug::SetCrashKeyReportingFunctions.
291 void SetCrashKeyValueForBaseDebug(const base::StringPiece& key, 292 void SetCrashKeyValueForBaseDebug(const base::StringPiece& key,
292 const base::StringPiece& value) { 293 const base::StringPiece& value) {
293 DCHECK(CrashKeysWin::keeper()); 294 DCHECK(CrashKeysWin::keeper());
294 CrashKeysWin::keeper()->SetCrashKeyValue(base::UTF8ToUTF16(key), 295 CrashKeysWin::keeper()->SetCrashKeyValue(base::UTF8ToUTF16(key),
295 base::UTF8ToUTF16(value)); 296 base::UTF8ToUTF16(value));
296 } 297 }
297 298
298 // Installed via base::debug::SetCrashKeyReportingFunctions. 299 // Installed via base::debug::SetCrashKeyReportingFunctions.
299 void ClearCrashKeyForBaseDebug(const base::StringPiece& key) { 300 void ClearCrashKeyForBaseDebug(const base::StringPiece& key) {
300 DCHECK(CrashKeysWin::keeper()); 301 DCHECK(CrashKeysWin::keeper());
301 CrashKeysWin::keeper()->ClearCrashKeyValue(base::UTF8ToUTF16(key)); 302 CrashKeysWin::keeper()->ClearCrashKeyValue(base::UTF8ToUTF16(key));
302 } 303 }
304 #endif // !defined(COMPONENT_BUILD)
303 305
304 } // namespace 306 } // namespace
305 307
306 // NOTE: This function is used by SyzyASAN to annotate crash reports. If you 308 // NOTE: This function is used by SyzyASAN to annotate crash reports. If you
307 // change the name or signature of this function you will break SyzyASAN 309 // change the name or signature of this function you will break SyzyASAN
308 // instrumented releases of Chrome. Please contact syzygy-team@chromium.org 310 // instrumented releases of Chrome. Please contact syzygy-team@chromium.org
309 // before doing so! 311 // before doing so!
310 extern "C" void __declspec(dllexport) __cdecl SetCrashKeyValueImpl( 312 extern "C" void __declspec(dllexport) __cdecl SetCrashKeyValueImpl(
311 const wchar_t* key, const wchar_t* value) { 313 const wchar_t* key, const wchar_t* value) {
312 CrashKeysWin* keeper = CrashKeysWin::keeper(); 314 CrashKeysWin* keeper = CrashKeysWin::keeper();
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 extern "C" void __declspec(dllexport) __cdecl 736 extern "C" void __declspec(dllexport) __cdecl
735 UnregisterNonABICompliantCodeRange(void* start) { 737 UnregisterNonABICompliantCodeRange(void* start) {
736 ExceptionHandlerRecord* record = 738 ExceptionHandlerRecord* record =
737 reinterpret_cast<ExceptionHandlerRecord*>(start); 739 reinterpret_cast<ExceptionHandlerRecord*>(start);
738 740
739 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); 741 CHECK(RtlDeleteFunctionTable(&record->runtime_function));
740 } 742 }
741 #endif 743 #endif
742 744
743 } // namespace breakpad 745 } // namespace breakpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698