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

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 137893002: Warm up EnumSystemLocalesEx() for Flash Player. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shrink to normal call. Justin you made the code look damn cool! Thanks! Created 6 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fb3638b7ac8dc61159e971af029a4c23f9fd6a95 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -52,6 +52,10 @@
#if defined(OS_WIN)
extern sandbox::TargetServices* g_target_services;
+// Used by EnumSystemLocales for warming up
yzshen1 2014/01/16 17:26:28 nit: - please add a blank line above this comment.
+static BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) {
+ return true;
yzshen1 2014/01/16 17:26:28 For consistency, it is better to use TRUE since th
+}
#else
extern void* g_target_services;
#endif
@@ -287,7 +291,7 @@ void PpapiThread::OnLoadPlugin(const base::FilePath& path,
if (permissions.HasPermission(ppapi::PERMISSION_FLASH) &&
base::win::OSInfo::GetInstance()->version() >=
base::win::VERSION_VISTA ) {
- LoadLibrary(L"dxva2.dll");
+ LoadLibrary(L"dxva2.dll");
yzshen1 2014/01/16 17:26:28 Wrong indent. it should be two spaces less. (The p
}
// Cause advapi32 to load before the sandbox is turned on.
@@ -297,6 +301,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
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698