Skip to content

Commit

Permalink
Warm up EnumSystemLocalesEx() for Flash Player.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yzshen@chromium.org committed Feb 12, 2014
1 parent baff4a6 commit e416990
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ Yael Aharon <yael.aharon@intel.com>
Yair Yogev <progame@chromium.org>
Yang Gu <yang.gu@intel.com>
Yarin Kaul <yarin.kaul@gmail.com>
Ye Liu <cbakgly@gmail.com>
Yi Shen <yi.shen@samsung.com>
Yoav Weiss <yoav@yoav.ws>
Yoav Zilberberg <yoav.zilberberg@gmail.com>
Expand Down
10 changes: 10 additions & 0 deletions content/ppapi_plugin/ppapi_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e416990

Please sign in to comment.