summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorhansl@google.com <hansl@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 19:20:27 +0000
committerhansl@google.com <hansl@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 19:20:27 +0000
commit64e5cc08486a26556c03c92fe3f746c8a6eaacb6 (patch)
tree411860c3baf8fd339aa40fa49ef58ba40630daaa /base
parent2bf2c3c8d64ba382286b6eadc7c5cd3444caf2f7 (diff)
downloadchromium_src-64e5cc08486a26556c03c92fe3f746c8a6eaacb6.zip
chromium_src-64e5cc08486a26556c03c92fe3f746c8a6eaacb6.tar.gz
chromium_src-64e5cc08486a26556c03c92fe3f746c8a6eaacb6.tar.bz2
Fix the testing::LogDisabler for the change r64883. See http://codereview.chromium.org/4262001/show
The r64883 broke most unit tests in CEEE that relied on disabling logs while testing error paths. BUG=None TEST=None Review URL: http://codereview.chromium.org/4390001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64948 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/logging.cc4
-rw-r--r--base/logging.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/base/logging.cc b/base/logging.cc
index ee4a4da..1ca00fb 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -420,6 +420,10 @@ void SetLogMessageHandler(LogMessageHandlerFunction handler) {
log_message_handler = handler;
}
+LogMessageHandlerFunction GetLogMessageHandler() {
+ return log_message_handler;
+}
+
// MSVC doesn't like complex extern templates and DLLs.
#if !defined(COMPILER_MSVC)
// Explicit instantiations for commonly used comparisons.
diff --git a/base/logging.h b/base/logging.h
index e1b088c..7315ea5 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -245,6 +245,7 @@ void SetShowErrorDialogs(bool enable_dialogs);
// (e.g. a silent one for Unit Tests)
typedef void (*LogAssertHandlerFunction)(const std::string& str);
void SetLogAssertHandler(LogAssertHandlerFunction handler);
+
// Sets the Log Report Handler that will be used to notify of check failures
// in non-debug mode. The default handler shows a dialog box and continues
// the execution, however clients can use this function to override with their
@@ -258,6 +259,7 @@ void SetLogReportHandler(LogReportHandlerFunction handler);
// should not be sent to other log destinations.
typedef bool (*LogMessageHandlerFunction)(int severity, const std::string& str);
void SetLogMessageHandler(LogMessageHandlerFunction handler);
+LogMessageHandlerFunction GetLogMessageHandler();
typedef int LogSeverity;
const LogSeverity LOG_INFO = 0;