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

Side by Side Diff: chrome/common/logging_chrome.cc

Issue 9838033: Upstream native crash handling changes for Android. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed a stale comment. Created 8 years, 8 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 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 // Need to include this before most other files because it defines 7 // Need to include this before most other files because it defines
8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define 8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define
9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the 9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the
10 // ViewMsgLog et al. functions. 10 // ViewMsgLog et al. functions.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // InitChromeLogging() and the beginning of CleanupChromeLogging(). 68 // InitChromeLogging() and the beginning of CleanupChromeLogging().
69 bool chrome_logging_redirected_ = false; 69 bool chrome_logging_redirected_ = false;
70 70
71 #if defined(OS_WIN) 71 #if defined(OS_WIN)
72 // {7FE69228-633E-4f06-80C1-527FEA23E3A7} 72 // {7FE69228-633E-4f06-80C1-527FEA23E3A7}
73 const GUID kChromeTraceProviderName = { 73 const GUID kChromeTraceProviderName = {
74 0x7fe69228, 0x633e, 0x4f06, 74 0x7fe69228, 0x633e, 0x4f06,
75 { 0x80, 0xc1, 0x52, 0x7f, 0xea, 0x23, 0xe3, 0xa7 } }; 75 { 0x80, 0xc1, 0x52, 0x7f, 0xea, 0x23, 0xe3, 0xa7 } };
76 #endif 76 #endif
77 77
78 #if defined(USE_LINUX_BREAKPAD) || defined(OS_MACOSX) 78 #if defined(USE_POSIX_BREAKPAD) || defined(OS_MACOSX)
79 // Pointer to the function that's called by DumpWithoutCrashing() to dump the 79 // Pointer to the function that's called by DumpWithoutCrashing() to dump the
80 // process's memory. 80 // process's memory.
81 void (*dump_without_crashing_function_)() = NULL; 81 void (*dump_without_crashing_function_)() = NULL;
82 #endif 82 #endif
83 83
84 // Assertion handler for logging errors that occur when dialogs are 84 // Assertion handler for logging errors that occur when dialogs are
85 // silenced. To record a new error, pass the log string associated 85 // silenced. To record a new error, pass the log string associated
86 // with that error in the str parameter. 86 // with that error in the str parameter.
87 MSVC_DISABLE_OPTIMIZE(); 87 MSVC_DISABLE_OPTIMIZE();
88 void SilentRuntimeAssertHandler(const std::string& str) { 88 void SilentRuntimeAssertHandler(const std::string& str) {
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } 451 }
452 log_file.close(); 452 log_file.close();
453 453
454 return assertion_count; 454 return assertion_count;
455 } 455 }
456 456
457 void DumpWithoutCrashing() { 457 void DumpWithoutCrashing() {
458 #if defined(OS_WIN) 458 #if defined(OS_WIN)
459 std::string str; 459 std::string str;
460 DumpProcessAssertHandler(str); 460 DumpProcessAssertHandler(str);
461 #elif defined(USE_LINUX_BREAKPAD) || defined(OS_MACOSX) 461 #elif defined(USE_POSIX_BREAKPAD) || defined(OS_MACOSX)
462 if (dump_without_crashing_function_) 462 if (dump_without_crashing_function_)
463 (*dump_without_crashing_function_)(); 463 (*dump_without_crashing_function_)();
464 #else 464 #else
465 NOTIMPLEMENTED(); 465 NOTIMPLEMENTED();
466 #endif 466 #endif
467 } 467 }
468 468
469 #if defined(USE_LINUX_BREAKPAD) || defined(OS_MACOSX) 469 #if defined(USE_POSIX_BREAKPAD) || defined(OS_MACOSX)
470 void SetDumpWithoutCrashingFunction(void (*function)()) { 470 void SetDumpWithoutCrashingFunction(void (*function)()) {
471 dump_without_crashing_function_ = function; 471 dump_without_crashing_function_ = function;
472 } 472 }
473 #endif 473 #endif
474 474
475 } // namespace logging 475 } // namespace logging
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698