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

Unified Diff: content/common/sandbox_win.cc

Issue 1352713002: Get logging to chrome_debug.log working again on Windows Vista+. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove stray comments Created 5 years, 3 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/app/chrome_main_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 110edb8a6812438efa13d1d1549568dfdc6553b0..0c6cc0d6f043b85f5dc5a0362700754fc340c3f0 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -11,6 +11,7 @@
#include "base/debug/profiler.h"
#include "base/files/file_util.h"
#include "base/hash.h"
+#include "base/logging.h"
#include "base/memory/shared_memory.h"
#include "base/metrics/sparse_histogram.h"
#include "base/path_service.h"
@@ -741,6 +742,17 @@ base::Process StartSandboxedProcess(
return base::Process();
}
+ // Allow the renderer and gpu processes to access the log file.
+ if (type_str == switches::kRendererProcess ||
+ type_str == switches::kGpuProcess) {
+ if (logging::IsLoggingToFileEnabled()) {
+ DCHECK(base::FilePath(logging::GetLogFileFullPath()).IsAbsolute());
+ policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
+ sandbox::TargetPolicy::FILES_ALLOW_ANY,
+ logging::GetLogFileFullPath().c_str());
+ }
+ }
+
#if !defined(OFFICIAL_BUILD)
// If stdout/stderr point to a Windows console, these calls will
// have no effect.
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698