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

Unified Diff: chrome/common/logging_chrome.cc

Issue 189603007: Let DCHECK in non-official-release build be opt-in with dcheck_always_on=1 only (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For landing Created 6 years, 9 months 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 | « chrome/common/chrome_switches.cc ('k') | chrome/test/automation/proxy_launcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/test/automation/proxy_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698