Don't lock the log file unless we are logging to a file.
[email protected],[email protected],[email protected]
BUG=146406
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10909164
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156750 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 5959c1c..7e49e5e3 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -262,9 +262,10 @@
IPC::Logging::set_log_function_map(&g_log_function_mapping);
#endif
LoggingDestination logging_dest = DetermineLogMode(command_line);
+ LogLockingState log_locking_state = LOCK_LOG_FILE;
FilePath log_path;
#if defined(OS_CHROMEOS)
- FilePath target_path;
+ FilePath target_path;
#endif
// Don't resolve the log path unless we need to. Otherwise we leave an open
@@ -291,6 +292,8 @@
// since that will remove the newly created link instead.
delete_old_log_file = logging::APPEND_TO_OLD_LOG_FILE;
#endif
+ } else {
+ log_locking_state = DONT_LOCK_LOG_FILE;
}
logging::DcheckState dcheck_state =
@@ -300,7 +303,7 @@
bool success = InitLogging(log_path.value().c_str(),
logging_dest,
- logging::LOCK_LOG_FILE,
+ log_locking_state,
delete_old_log_file,
dcheck_state);