| Index: chrome/installer/util/installation_validation_helper.cc
|
| diff --git a/chrome/installer/util/installation_validation_helper.cc b/chrome/installer/util/installation_validation_helper.cc
|
| index e0252e975b26380a34985e42d0343b4d41c1c0eb..c968c8308de4fa6a4855f7ea715c89f97d3da445 100644
|
| --- a/chrome/installer/util/installation_validation_helper.cc
|
| +++ b/chrome/installer/util/installation_validation_helper.cc
|
| @@ -34,7 +34,6 @@ class FailureLogHelper {
|
| const std::string& str);
|
|
|
| static const logging::LogSeverity kViolationSeverity_;
|
| - static logging::LogMessageHandlerFunction old_message_handler_;
|
| static int old_min_log_level_;
|
| };
|
|
|
| @@ -44,29 +43,21 @@ const logging::LogSeverity
|
| FailureLogHelper::kViolationSeverity_ = logging::LOG_ERROR;
|
|
|
| // static
|
| -logging::LogMessageHandlerFunction
|
| - FailureLogHelper::old_message_handler_ = NULL;
|
| -
|
| -// static
|
| int FailureLogHelper::old_min_log_level_ =
|
| FailureLogHelper::kViolationSeverity_;
|
|
|
| FailureLogHelper::FailureLogHelper() {
|
| - LOG_ASSERT(old_message_handler_ == NULL);
|
| -
|
| // The validator logs at ERROR level. Ensure that it generates messages so we
|
| // can transform them into test failures.
|
| old_min_log_level_ = logging::GetMinLogLevel();
|
| if (old_min_log_level_ > kViolationSeverity_)
|
| logging::SetMinLogLevel(kViolationSeverity_);
|
|
|
| - old_message_handler_ = logging::GetLogMessageHandler();
|
| - logging::SetLogMessageHandler(&AddFailureForLogMessage);
|
| + logging::PushLogMessageHandler(&AddFailureForLogMessage);
|
| }
|
|
|
| FailureLogHelper::~FailureLogHelper() {
|
| - logging::SetLogMessageHandler(old_message_handler_);
|
| - old_message_handler_ = NULL;
|
| + logging::PopLogMessageHandler();
|
|
|
| if (old_min_log_level_ > kViolationSeverity_)
|
| logging::SetMinLogLevel(old_min_log_level_);
|
| @@ -92,9 +83,6 @@ bool FailureLogHelper::AddFailureForLogMessage(int severity,
|
| return true;
|
| }
|
|
|
| - if (old_message_handler_ != NULL)
|
| - return (old_message_handler_)(severity, file, line, message_start, str);
|
| -
|
| return false;
|
| }
|
|
|
|
|