Index: content/ppapi_plugin/ppapi_thread.cc |
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc |
index 5ed1873cce87364ef7a0aeb231b58a3bebd2cf44..e5ad093dbdf60601bb346390b6de7b2938f038c3 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 |