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

Unified Diff: content/common/sandbox_win.cc

Issue 209163002: Support DirectWrite with sandbox on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: content/common/sandbox_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index aea586054e51329e97627abc203ac3cfdb7f2b06..e2c9e8f1408a86e9177ae2b8b9d3c7a219706981 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -309,6 +309,17 @@ bool AddGenericPolicy(sandbox::TargetPolicy* policy) {
if (result != sandbox::SBOX_ALL_OK)
return false;
+ // XXX: This is in the wrong place, it should only apply to the renderer.
scottmg 2014/03/21 23:04:06 This needs to be made renderer-only rather than in
Will Harris 2014/03/21 23:55:47 suggested location below around 657
+ base::FilePath directory;
+ if (!PathService::Get(base::DIR_WINDOWS_FONTS, &directory))
+ return false;
+ directory.Append(FILE_PATH_LITERAL("\\*"));
+ result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
+ sandbox::TargetPolicy::FILES_ALLOW_READONLY,
+ directory.value().c_str());
+ if (result != sandbox::SBOX_ALL_OK)
+ return false;
+
// Add the policy for debug message only in debug
#ifndef NDEBUG
base::FilePath app_dir;

Powered by Google App Engine
This is Rietveld 408576698