Index: chrome/common/logging_chrome.cc |
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc |
index 3587cbb1ec42641e236d3f49de47bfa8648b36a1..be0ddffa1c533bd6c7ab46dd284cb54349a14752 100644 |
--- a/chrome/common/logging_chrome.cc |
+++ b/chrome/common/logging_chrome.cc |
@@ -243,17 +243,11 @@ void RedirectChromeLogging(const CommandLine& command_line) { |
// Always force a new symlink when redirecting. |
base::FilePath target_path = SetUpSymlinkIfNeeded(log_path, true); |
- logging::DcheckState dcheck_state = |
- command_line.HasSwitch(switches::kEnableDCHECK) ? |
- logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS : |
- logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; |
- |
// ChromeOS always logs through the symlink, so it shouldn't be |
// deleted if it already exists. |
logging::LoggingSettings settings; |
settings.logging_dest = DetermineLogMode(command_line); |
settings.log_file = log_path.value().c_str(); |
- settings.dcheck_state = dcheck_state; |
if (!logging::InitLogging(settings)) { |
DLOG(ERROR) << "Unable to initialize logging to " << log_path.value(); |
RemoveSymlinkAndLog(log_path, target_path); |
@@ -303,17 +297,11 @@ void InitChromeLogging(const CommandLine& command_line, |
log_locking_state = DONT_LOCK_LOG_FILE; |
} |
- logging::DcheckState dcheck_state = |
- command_line.HasSwitch(switches::kEnableDCHECK) ? |
- logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS : |
- logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; |
- |
logging::LoggingSettings settings; |
settings.logging_dest = logging_dest; |
settings.log_file = log_path.value().c_str(); |
settings.lock_log = log_locking_state; |
settings.delete_old = delete_old_log_file; |
- settings.dcheck_state = dcheck_state; |
bool success = logging::InitLogging(settings); |
#if defined(OS_CHROMEOS) |
@@ -371,8 +359,7 @@ void InitChromeLogging(const CommandLine& command_line, |
#endif |
#ifdef NDEBUG |
- if (command_line.HasSwitch(switches::kSilentDumpOnDCHECK) && |
- command_line.HasSwitch(switches::kEnableDCHECK)) { |
+ if (command_line.HasSwitch(switches::kSilentDumpOnDCHECK) && DCHECK_IS_ON()) { |
#if defined(OS_WIN) |
logging::SetLogReportHandler(DumpProcessAssertHandler); |
#endif |