| 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(
|
|
|