diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 01:03:36 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 01:03:36 +0000 |
commit | 7c10f7553bf4da999f954e501fc2908e10dd3bcf (patch) | |
tree | 09ea21b6c28bc9132d0a2f4b678cc810a29e3fd1 /chrome/common/logging_chrome.cc | |
parent | 9a425422549b0dc33730e85bdae2fd441caa55da (diff) | |
download | chromium_src-7c10f7553bf4da999f954e501fc2908e10dd3bcf.zip chromium_src-7c10f7553bf4da999f954e501fc2908e10dd3bcf.tar.gz chromium_src-7c10f7553bf4da999f954e501fc2908e10dd3bcf.tar.bz2 |
Made logging not look up --enable-dcheck from command line
Made --enable-dcheck a parameter to InitLogging() and fixed up all
callsites.
BUG=62736
TEST=Manual
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70782
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70920
Review URL: http://codereview.chromium.org/6070006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/logging_chrome.cc')
-rw-r--r-- | chrome/common/logging_chrome.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc index c607f21..9653c40 100644 --- a/chrome/common/logging_chrome.cc +++ b/chrome/common/logging_chrome.cc @@ -216,12 +216,18 @@ void RedirectChromeLogging(const CommandLine& command_line) { // Always force a new symlink when redirecting. 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. if (!InitLogging(log_path.value().c_str(), DetermineLogMode(command_line), logging::LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE)) { + logging::APPEND_TO_OLD_LOG_FILE, + dcheck_state)) { LOG(ERROR) << "Unable to initialize logging to " << log_path.value(); RemoveSymlinkAndLog(log_path, target_path); } else { @@ -262,10 +268,16 @@ void InitChromeLogging(const CommandLine& command_line, delete_old_log_file = logging::APPEND_TO_OLD_LOG_FILE; #endif + 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; + bool success = InitLogging(log_path.value().c_str(), DetermineLogMode(command_line), logging::LOCK_LOG_FILE, - delete_old_log_file); + delete_old_log_file, + dcheck_state); #if defined(OS_CHROMEOS) if (!success) { |