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

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

Issue 3945002: Move debug-related stuff from base to the base/debug directory and use the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 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
« no previous file with comments | « chrome/browser/worker_host/worker_process_host.cc ('k') | chrome/common/sandbox_policy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 #if defined(OS_WIN) 25 #if defined(OS_WIN)
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_util.h" 35 #include "base/debug/debugger.h"
36 #include "base/environment.h" 36 #include "base/environment.h"
37 #include "base/file_path.h" 37 #include "base/file_path.h"
38 #include "base/file_util.h" 38 #include "base/file_util.h"
39 #include "base/logging.h" 39 #include "base/logging.h"
40 #include "base/path_service.h" 40 #include "base/path_service.h"
41 #include "base/string_number_conversions.h" 41 #include "base/string_number_conversions.h"
42 #include "base/string_util.h" 42 #include "base/string_util.h"
43 #include "base/time.h" 43 #include "base/time.h"
44 #include "base/utf_string_conversions.h" 44 #include "base/utf_string_conversions.h"
45 #include "chrome/common/chrome_paths.h" 45 #include "chrome/common/chrome_paths.h"
(...skipping 20 matching lines...) Expand all
66 // {7FE69228-633E-4f06-80C1-527FEA23E3A7} 66 // {7FE69228-633E-4f06-80C1-527FEA23E3A7}
67 DEFINE_GUID(kChromeTraceProviderName, 67 DEFINE_GUID(kChromeTraceProviderName,
68 0x7fe69228, 0x633e, 0x4f06, 0x80, 0xc1, 0x52, 0x7f, 0xea, 0x23, 0xe3, 0xa7); 68 0x7fe69228, 0x633e, 0x4f06, 0x80, 0xc1, 0x52, 0x7f, 0xea, 0x23, 0xe3, 0xa7);
69 #endif 69 #endif
70 70
71 // Assertion handler for logging errors that occur when dialogs are 71 // Assertion handler for logging errors that occur when dialogs are
72 // silenced. To record a new error, pass the log string associated 72 // silenced. To record a new error, pass the log string associated
73 // with that error in the str parameter. 73 // with that error in the str parameter.
74 MSVC_DISABLE_OPTIMIZE(); 74 MSVC_DISABLE_OPTIMIZE();
75 static void SilentRuntimeAssertHandler(const std::string& str) { 75 static void SilentRuntimeAssertHandler(const std::string& str) {
76 DebugUtil::BreakDebugger(); 76 base::debug::BreakDebugger();
77 } 77 }
78 static void SilentRuntimeReportHandler(const std::string& str) { 78 static void SilentRuntimeReportHandler(const std::string& str) {
79 } 79 }
80 MSVC_ENABLE_OPTIMIZE(); 80 MSVC_ENABLE_OPTIMIZE();
81 81
82 // Suppresses error/assertion dialogs and enables the logging of 82 // Suppresses error/assertion dialogs and enables the logging of
83 // those errors into silenced_errors_. 83 // those errors into silenced_errors_.
84 static void SuppressDialogs() { 84 static void SuppressDialogs() {
85 if (dialogs_are_suppressed_) 85 if (dialogs_are_suppressed_)
86 return; 86 return;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 assertions->push_back(wide_line); 297 assertions->push_back(wide_line);
298 ++assertion_count; 298 ++assertion_count;
299 } 299 }
300 } 300 }
301 log_file.close(); 301 log_file.close();
302 302
303 return assertion_count; 303 return assertion_count;
304 } 304 }
305 305
306 } // namespace logging 306 } // namespace logging
OLDNEW
« no previous file with comments | « chrome/browser/worker_host/worker_process_host.cc ('k') | chrome/common/sandbox_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698