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

Unified Diff: content/common/dwrite_font_platform_win.cc

Issue 1122163002: Ensure that the DirectWrite font cache works in Chrome canary on Windows 8+ with AppContainer prote… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to tip Created 5 years, 7 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 | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/sandbox_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/dwrite_font_platform_win.cc
diff --git a/content/common/dwrite_font_platform_win.cc b/content/common/dwrite_font_platform_win.cc
index 4847963d07f5cc687e4ca4b3cd8a7c11a4d7cac8..e312651ca71218a90feb3598e30afecc50394253 100644
--- a/content/common/dwrite_font_platform_win.cc
+++ b/content/common/dwrite_font_platform_win.cc
@@ -921,17 +921,19 @@ bool FontCollectionLoader::IsFileCached(UINT32 font_key) {
}
bool FontCollectionLoader::LoadCacheFile() {
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kFontCacheSharedMemSuffix)) {
- return false;
- }
- base::SharedMemory* shared_mem = new base::SharedMemory();
- std::string name(content::kFontCacheSharedSectionName);
- name.append(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kFontCacheSharedMemSuffix));
- if (!shared_mem->Open(name.c_str(), true))
+ std::string font_cache_handle_string =
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kFontCacheSharedHandle);
+ if (font_cache_handle_string.empty())
return false;
+ base::SharedMemoryHandle font_cache_handle = NULL;
+ base::StringToUint(font_cache_handle_string,
+ reinterpret_cast<unsigned int*>(&font_cache_handle));
+ DCHECK(font_cache_handle);
+
+ base::SharedMemory* shared_mem = new base::SharedMemory(
+ font_cache_handle, true);
// Map while file
shared_mem->Map(0);
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/sandbox_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698