| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // This should be true for exactly the period between the end of | 57 // This should be true for exactly the period between the end of |
| 58 // InitChromeLogging() and the beginning of CleanupChromeLogging(). | 58 // InitChromeLogging() and the beginning of CleanupChromeLogging(). |
| 59 static bool chrome_logging_initialized_ = false; | 59 static bool chrome_logging_initialized_ = false; |
| 60 | 60 |
| 61 // This should be true for exactly the period between the end of | 61 // This should be true for exactly the period between the end of |
| 62 // InitChromeLogging() and the beginning of CleanupChromeLogging(). | 62 // InitChromeLogging() and the beginning of CleanupChromeLogging(). |
| 63 static bool chrome_logging_redirected_ = false; | 63 static bool chrome_logging_redirected_ = false; |
| 64 | 64 |
| 65 #if defined(OS_WIN) | 65 #if defined(OS_WIN) |
| 66 // {7FE69228-633E-4f06-80C1-527FEA23E3A7} | 66 // {7FE69228-633E-4f06-80C1-527FEA23E3A7} |
| 67 DEFINE_GUID(kChromeTraceProviderName, | 67 static const GUID kChromeTraceProviderName = { |
| 68 0x7fe69228, 0x633e, 0x4f06, 0x80, 0xc1, 0x52, 0x7f, 0xea, 0x23, 0xe3, 0xa7); | 68 0x7fe69228, 0x633e, 0x4f06, |
| 69 { 0x80, 0xc1, 0x52, 0x7f, 0xea, 0x23, 0xe3, 0xa7 } }; |
| 69 #endif | 70 #endif |
| 70 | 71 |
| 71 // Assertion handler for logging errors that occur when dialogs are | 72 // Assertion handler for logging errors that occur when dialogs are |
| 72 // silenced. To record a new error, pass the log string associated | 73 // silenced. To record a new error, pass the log string associated |
| 73 // with that error in the str parameter. | 74 // with that error in the str parameter. |
| 74 MSVC_DISABLE_OPTIMIZE(); | 75 MSVC_DISABLE_OPTIMIZE(); |
| 75 static void SilentRuntimeAssertHandler(const std::string& str) { | 76 static void SilentRuntimeAssertHandler(const std::string& str) { |
| 76 base::debug::BreakDebugger(); | 77 base::debug::BreakDebugger(); |
| 77 } | 78 } |
| 78 static void SilentRuntimeReportHandler(const std::string& str) { | 79 static void SilentRuntimeReportHandler(const std::string& str) { |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 assertions->push_back(wide_line); | 390 assertions->push_back(wide_line); |
| 390 ++assertion_count; | 391 ++assertion_count; |
| 391 } | 392 } |
| 392 } | 393 } |
| 393 log_file.close(); | 394 log_file.close(); |
| 394 | 395 |
| 395 return assertion_count; | 396 return assertion_count; |
| 396 } | 397 } |
| 397 | 398 |
| 398 } // namespace logging | 399 } // namespace logging |
| OLD | NEW |