OLD | NEW |
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 15 matching lines...) Expand all Loading... |
26 #include <windows.h> | 26 #include <windows.h> |
27 #endif | 27 #endif |
28 | 28 |
29 #include <fstream> | 29 #include <fstream> |
30 | 30 |
31 #include "chrome/common/logging_chrome.h" | 31 #include "chrome/common/logging_chrome.h" |
32 | 32 |
33 #include "base/command_line.h" | 33 #include "base/command_line.h" |
34 #include "base/compiler_specific.h" | 34 #include "base/compiler_specific.h" |
35 #include "base/debug/debugger.h" | 35 #include "base/debug/debugger.h" |
| 36 #include "base/debug/dump_without_crashing.h" |
36 #include "base/environment.h" | 37 #include "base/environment.h" |
37 #include "base/file_util.h" | 38 #include "base/file_util.h" |
38 #include "base/files/file_path.h" | 39 #include "base/files/file_path.h" |
39 #include "base/logging.h" | 40 #include "base/logging.h" |
40 #include "base/path_service.h" | 41 #include "base/path_service.h" |
41 #include "base/strings/string_number_conversions.h" | 42 #include "base/strings/string_number_conversions.h" |
42 #include "base/strings/string_util.h" | 43 #include "base/strings/string_util.h" |
43 #include "base/strings/stringprintf.h" | 44 #include "base/strings/stringprintf.h" |
44 #include "base/strings/utf_string_conversions.h" | 45 #include "base/strings/utf_string_conversions.h" |
45 #include "base/threading/thread_restrictions.h" | 46 #include "base/threading/thread_restrictions.h" |
46 #include "base/time/time.h" | 47 #include "base/time/time.h" |
47 #include "chrome/common/chrome_constants.h" | 48 #include "chrome/common/chrome_constants.h" |
48 #include "chrome/common/chrome_paths.h" | 49 #include "chrome/common/chrome_paths.h" |
49 #include "chrome/common/chrome_switches.h" | 50 #include "chrome/common/chrome_switches.h" |
50 #include "chrome/common/dump_without_crashing.h" | |
51 #include "chrome/common/env_vars.h" | 51 #include "chrome/common/env_vars.h" |
52 #include "ipc/ipc_logging.h" | 52 #include "ipc/ipc_logging.h" |
53 | 53 |
54 #if defined(OS_CHROMEOS) | 54 #if defined(OS_CHROMEOS) |
55 #include "chromeos/chromeos_switches.h" | 55 #include "chromeos/chromeos_switches.h" |
56 #endif | 56 #endif |
57 | 57 |
58 #if defined(OS_WIN) | 58 #if defined(OS_WIN) |
59 #include <initguid.h> | 59 #include <initguid.h> |
60 #include "base/logging_win.h" | 60 #include "base/logging_win.h" |
(...skipping 28 matching lines...) Expand all Loading... |
89 MSVC_DISABLE_OPTIMIZE(); | 89 MSVC_DISABLE_OPTIMIZE(); |
90 void SilentRuntimeAssertHandler(const std::string& str) { | 90 void SilentRuntimeAssertHandler(const std::string& str) { |
91 base::debug::BreakDebugger(); | 91 base::debug::BreakDebugger(); |
92 } | 92 } |
93 void SilentRuntimeReportHandler(const std::string& str) { | 93 void SilentRuntimeReportHandler(const std::string& str) { |
94 } | 94 } |
95 #if defined(OS_WIN) | 95 #if defined(OS_WIN) |
96 // Handler to silently dump the current process when there is an assert in | 96 // Handler to silently dump the current process when there is an assert in |
97 // chrome. | 97 // chrome. |
98 void DumpProcessAssertHandler(const std::string& str) { | 98 void DumpProcessAssertHandler(const std::string& str) { |
99 logging::DumpWithoutCrashing(); | 99 base::debug::DumpWithoutCrashing(); |
100 } | 100 } |
101 #endif // OS_WIN | 101 #endif // OS_WIN |
102 MSVC_ENABLE_OPTIMIZE(); | 102 MSVC_ENABLE_OPTIMIZE(); |
103 | 103 |
104 // Suppresses error/assertion dialogs and enables the logging of | 104 // Suppresses error/assertion dialogs and enables the logging of |
105 // those errors into silenced_errors_. | 105 // those errors into silenced_errors_. |
106 void SuppressDialogs() { | 106 void SuppressDialogs() { |
107 if (dialogs_are_suppressed_) | 107 if (dialogs_are_suppressed_) |
108 return; | 108 return; |
109 | 109 |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 time_deets.year, | 455 time_deets.year, |
456 time_deets.month, | 456 time_deets.month, |
457 time_deets.day_of_month, | 457 time_deets.day_of_month, |
458 time_deets.hour, | 458 time_deets.hour, |
459 time_deets.minute, | 459 time_deets.minute, |
460 time_deets.second); | 460 time_deets.second); |
461 return base_path.InsertBeforeExtensionASCII(suffix); | 461 return base_path.InsertBeforeExtensionASCII(suffix); |
462 } | 462 } |
463 | 463 |
464 } // namespace logging | 464 } // namespace logging |
OLD | NEW |