diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 23:55:53 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 23:55:53 +0000 |
commit | e41699073971cb76ce650b7b88de04e7726874f2 (patch) | |
tree | 728c147afcf19e95828fef3e8a8c114e8d417364 /content/ppapi_plugin | |
parent | baff4a61e1b63bbb11277e3f4cb70c5c0d8a67c6 (diff) | |
download | chromium_src-e41699073971cb76ce650b7b88de04e7726874f2.zip chromium_src-e41699073971cb76ce650b7b88de04e7726874f2.tar.gz chromium_src-e41699073971cb76ce650b7b88de04e7726874f2.tar.bz2 |
Warm up EnumSystemLocalesEx() for Flash Player.
Land the patch on behalf of Ye Liu <cbakgly@gmail.com>
The original CL is:
https://codereview.chromium.org/137893002/
(All the three reviewers on the TBR line have LG-ed that CL.)
TBR=piman@chromium.org,jschuh@chromium.org,yzshen@chromium.org
BUG=None
Review URL: https://codereview.chromium.org/161263002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250852 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc index 5ed1873..e5ad093 100644 --- a/content/ppapi_plugin/ppapi_thread.cc +++ b/content/ppapi_plugin/ppapi_thread.cc @@ -52,6 +52,11 @@ #if defined(OS_WIN) extern sandbox::TargetServices* g_target_services; + +// Used by EnumSystemLocales for warming up. +static BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) { + return TRUE; +} #else extern void* g_target_services; #endif @@ -297,6 +302,11 @@ void PpapiThread::OnLoadPlugin(const base::FilePath& path, ::GetUserDefaultLangID(); ::GetUserDefaultLCID(); + if (permissions.HasPermission(ppapi::PERMISSION_FLASH)) { + // Warm up system locales. + EnumSystemLocalesW(EnumLocalesProc, LCID_INSTALLED); + } + g_target_services->LowerToken(); } #endif |