summaryrefslogtreecommitdiffstats
path: root/base/logging.h
diff options
context:
space:
mode:
authorananta <ananta@chromium.org>2015-09-17 18:00:09 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-18 01:00:48 +0000
commit61762fb871f414a2987b635aa249e3a9c57a4290 (patch)
treeda934fdaf2d7290be174a47f188bc1b1dbff2ef6 /base/logging.h
parent76f2e55e55178840bee045a15c8874ad46f18f43 (diff)
downloadchromium_src-61762fb871f414a2987b635aa249e3a9c57a4290.zip
chromium_src-61762fb871f414a2987b635aa249e3a9c57a4290.tar.gz
chromium_src-61762fb871f414a2987b635aa249e3a9c57a4290.tar.bz2
Get logging to chrome_debug.log working again on Windows Vista+.
Logging to the chrome_debug.log file is supposed to work across the browser, renderer, gpu process, etc. However currently it only works in the browser. Reason being the chrome_debug.log file lives in the same directory as chrome.exe and the fact that the GPU and renderer processes are launched in low integrity on Vista+. In low integrity mode you have write access to folders and files which are marked as being accessible from low and no write up, everywhere else. Fix is to not initialize the logging system during the presandbox warmup on Windows and do it during sandbox warmup. We also add a filesystem policy to allow access to the log file from the renderer and GPU process. The other change here is to remove the mutex and SetFilePointer code in the logging subsystem on Windows. These exist for atomically appending to the log file. Windows provides that functionality via the FILE_APPEND_DATA access mask. BUG=532660 Review URL: https://codereview.chromium.org/1352713002 Cr-Commit-Position: refs/heads/master@{#349561}
Diffstat (limited to 'base/logging.h')
-rw-r--r--base/logging.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/base/logging.h b/base/logging.h
index ad9033e..f91d174 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -892,6 +892,9 @@ BASE_EXPORT void RawLog(int level, const char* message);
} while (0)
#if defined(OS_WIN)
+// Returns true if logging to file is enabled.
+BASE_EXPORT bool IsLoggingToFileEnabled();
+
// Returns the default log file path.
BASE_EXPORT std::wstring GetLogFileFullPath();
#endif