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

Unified Diff: chrome/browser/chrome_browser_main_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: Remove extraneous namespace qualification 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
« no previous file with comments | « no previous file | chrome/utility/font_cache_handler_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main_win.cc
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc
index 0a1238b0e86f8f3a59a6579e9170f9b281f2f8a5..895491dfed29d80f6ed8a35c7387d76fefd6c5c3 100644
--- a/chrome/browser/chrome_browser_main_win.cc
+++ b/chrome/browser/chrome_browser_main_win.cc
@@ -115,8 +115,8 @@ class TranslationDelegate : public installer::TranslationDelegate {
void ExecuteFontCacheBuildTask(const base::FilePath& path) {
base::WeakPtr<content::UtilityProcessHost> utility_process_host(
content::UtilityProcessHost::Create(NULL, NULL)->AsWeakPtr());
- utility_process_host->SetName(l10n_util::GetStringUTF16(
- IDS_UTILITY_PROCESS_FONT_CACHE_BUILDER_NAME));
+ utility_process_host->SetName(
+ l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_FONT_CACHE_BUILDER_NAME));
utility_process_host->DisableSandbox();
utility_process_host->Send(
new ChromeUtilityHostMsg_BuildDirectWriteFontCache(path));
@@ -344,7 +344,9 @@ void ChromeBrowserMainPartsWin::PostProfileInit() {
ChromeBrowserMainParts::PostProfileInit();
// DirectWrite support is mainly available Windows 7 and up.
- if (gfx::win::ShouldUseDirectWrite()) {
+ // Skip loading the font cache if we are using the font proxy field trial.
+ if (gfx::win::ShouldUseDirectWrite() &&
+ !content::ShouldUseDirectWriteFontProxyFieldTrial()) {
base::FilePath path(
profile()->GetPath().AppendASCII(content::kFontCacheSharedSectionName));
// This function will create a read only section if cache file exists
@@ -354,14 +356,14 @@ void ChromeBrowserMainPartsWin::PostProfileInit() {
// We delay building of font cache until first startup page loads.
// During first renderer start there are lot of things happening
// simultaneously some of them are:
- // - Renderer is going through all font files on the system to create
- // a font collection.
- // - Renderer loading up startup URL, accessing HTML/JS File cache,
- // net activity etc.
+ // - Renderer is going through all font files on the system to create a
+ // font collection.
+ // - Renderer loading up startup URL, accessing HTML/JS File cache, net
+ // activity etc.
// - Extension initialization.
- // We delay building of cache mainly to avoid parallel font file
- // loading along with Renderer. Some systems have significant number of
- // font files which takes long time to process.
+ // We delay building of cache mainly to avoid parallel font file loading
+ // along with Renderer. Some systems have significant number of font files
+ // which takes long time to process.
// Related information is at http://crbug.com/436195.
const int kBuildFontCacheDelaySec = 30;
content::BrowserThread::PostDelayedTask(
« no previous file with comments | « no previous file | chrome/utility/font_cache_handler_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698