Index: chrome/installer/util/installation_validator_unittest.cc |
diff --git a/chrome/installer/util/installation_validator_unittest.cc b/chrome/installer/util/installation_validator_unittest.cc |
index c181aa05a526722c025874fbdea782ad265c90c8..5bff16e370304e1bc4645302c35fdb0c26aeb7ee 100644 |
--- a/chrome/installer/util/installation_validator_unittest.cc |
+++ b/chrome/installer/util/installation_validator_unittest.cc |
@@ -282,16 +282,11 @@ class InstallationValidatorTest |
FakeInstallationState* state); |
void TearDown() override; |
- static logging::LogMessageHandlerFunction old_log_message_handler_; |
static ValidationErrorRecipient* validation_error_recipient_; |
static InstallationTypeToModifiers* type_to_modifiers_; |
}; |
// static |
-logging::LogMessageHandlerFunction |
- InstallationValidatorTest::old_log_message_handler_ = NULL; |
- |
-// static |
InstallationValidatorTest::ValidationErrorRecipient* |
InstallationValidatorTest::validation_error_recipient_ = NULL; |
@@ -311,8 +306,7 @@ int InstallationValidatorTest::GetChannelModifiers( |
// static |
void InstallationValidatorTest::SetUpTestCase() { |
DCHECK(type_to_modifiers_ == NULL); |
- old_log_message_handler_ = logging::GetLogMessageHandler(); |
- logging::SetLogMessageHandler(&HandleLogMessage); |
+ logging::PushLogMessageHandler(HandleLogMessage); |
type_to_modifiers_ = new InstallationTypeToModifiers(); |
InstallationTypeToModifiers& ttm = *type_to_modifiers_; |
@@ -330,8 +324,7 @@ void InstallationValidatorTest::SetUpTestCase() { |
// static |
void InstallationValidatorTest::TearDownTestCase() { |
- logging::SetLogMessageHandler(old_log_message_handler_); |
- old_log_message_handler_ = NULL; |
+ logging::PopLogMessageHandler(HandleLogMessage); |
delete type_to_modifiers_; |
type_to_modifiers_ = NULL; |
@@ -360,9 +353,6 @@ bool InstallationValidatorTest::HandleLogMessage(int severity, |
return true; |
} |
- if (old_log_message_handler_ != NULL) |
- return (old_log_message_handler_)(severity, file, line, message_start, str); |
- |
return false; |
} |