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

Unified Diff: content/common/sandbox_win.cc

Issue 1557513002: Add logic to switch to DirectWrite font proxy via field trial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment and remove a blank line Created 4 years, 11 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 937ab23e12e8c9dafd93cf64a6a5cecc9272aa3f..9e5f55cfb0bf06626aa9b1888483c6269f6e3216 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -738,21 +738,23 @@ base::Process StartSandboxedProcess(
sandbox::TargetPolicy::FILES_ALLOW_READONLY,
policy);
- // If DirectWrite is enabled for font rendering then open the font cache
- // section which is created by the browser and pass the handle to the
- // renderer process. This is needed because renderer processes on
- // Windows 8+ may be running in an AppContainer sandbox and hence their
- // kernel object namespace may be partitioned.
- std::string name(content::kFontCacheSharedSectionName);
- name.append(base::UintToString(base::GetCurrentProcId()));
-
- base::SharedMemory direct_write_font_cache_section;
- if (direct_write_font_cache_section.Open(name, true)) {
- void* shared_handle = policy->AddHandleToShare(
- direct_write_font_cache_section.handle().GetHandle());
- cmd_line->AppendSwitchASCII(
- switches::kFontCacheSharedHandle,
- base::UintToString(base::win::HandleToUint32(shared_handle)));
+ if (!content::ShouldUseDirectWriteFontProxyFieldTrial()) {
jam 2016/01/11 05:05:45 ditto
Ilya Kulshin 2016/01/11 20:56:52 Done.
+ // If DirectWrite is enabled for font rendering then open the font
+ // cache section which is created by the browser and pass the handle to
+ // the renderer process. This is needed because renderer processes on
+ // Windows 8+ may be running in an AppContainer sandbox and hence their
+ // kernel object namespace may be partitioned.
+ std::string name(content::kFontCacheSharedSectionName);
+ name.append(base::UintToString(base::GetCurrentProcId()));
+
+ base::SharedMemory direct_write_font_cache_section;
+ if (direct_write_font_cache_section.Open(name, true)) {
+ void* shared_handle = policy->AddHandleToShare(
+ direct_write_font_cache_section.handle().GetHandle());
+ cmd_line->AppendSwitchASCII(
+ switches::kFontCacheSharedHandle,
+ base::UintToString(base::win::HandleToUint32(shared_handle)));
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698