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

Unified Diff: ceee/testing/utils/test_utils.cc

Issue 4390001: Fix the testing::LogDisabler for the change r64883. See http://codereview.chr... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ceee/testing/utils/test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ceee/testing/utils/test_utils.cc
===================================================================
--- ceee/testing/utils/test_utils.cc (revision 64914)
+++ ceee/testing/utils/test_utils.cc (working copy)
@@ -58,13 +58,17 @@
}
+bool LogDisabler::DropMessageHandler(int severity, const std::string& str) {
+ return true;
+}
+
LogDisabler::LogDisabler() {
- initial_log_level_ = logging::GetMinLogLevel();
- logging::SetMinLogLevel(logging::LOG_FATAL + 1);
+ old_handler_ = logging::GetLogMessageHandler();
+ logging::SetLogMessageHandler(DropMessageHandler);
}
LogDisabler::~LogDisabler() {
- logging::SetMinLogLevel(initial_log_level_);
+ logging::SetLogMessageHandler(old_handler_);
}
PathServiceOverrider::PathServiceOverrider(int key, const FilePath& path) {
« no previous file with comments | « ceee/testing/utils/test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698