diff options
author | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-05 16:38:41 +0000 |
---|---|---|
committer | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-05 16:38:41 +0000 |
commit | 1831acf00bbfad84ffe7492dee9fe87550bfae32 (patch) | |
tree | 7a3b9dd190cfbfcbcdbf848a56cf0e82e11fcf46 /chrome/browser | |
parent | 9ba448d61f35443f907d6b434ce58acd14a1c235 (diff) | |
download | chromium_src-1831acf00bbfad84ffe7492dee9fe87550bfae32.zip chromium_src-1831acf00bbfad84ffe7492dee9fe87550bfae32.tar.gz chromium_src-1831acf00bbfad84ffe7492dee9fe87550bfae32.tar.bz2 |
Add a dummy call to icu::TimeZone.createDefault() before the sandbox kicks in.
This is necessary to get the datetime formatting work correctly in a renderer process (e.g. FTP directory list that is now done in a renderer process.)
BUG=23361,23082
TEST=...
Review URL: http://codereview.chromium.org/243060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/zygote_main_linux.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/zygote_main_linux.cc b/chrome/browser/zygote_main_linux.cc index fd365ab..eb0ef42 100644 --- a/chrome/browser/zygote_main_linux.cc +++ b/chrome/browser/zygote_main_linux.cc @@ -18,6 +18,7 @@ #include "base/path_service.h" #include "base/pickle.h" #include "base/rand_util.h" +#include "base/scoped_ptr.h" #include "base/sys_info.h" #include "base/unix_domain_socket_posix.h" @@ -37,6 +38,8 @@ #include <selinux/context.h> #endif +#include "unicode/timezone.h" + // http://code.google.com/p/chromium/wiki/LinuxZygote static const int kMagicSandboxIPCDescriptor = 5; @@ -377,6 +380,12 @@ static void PreSandboxInit() { const char* locale = setlocale(LC_ALL, ""); LOG_IF(WARNING, locale == NULL) << "setlocale failed."; + // ICU DateFormat class (used in base/time_format.cc) needs to get the + // Olson timezone ID by accessing the zoneinfo files on disk. After + // TimeZone::createDefault is called once here, the timezone ID is + // cached and there's no more need to access the file system. + scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault()); + FilePath module_path; if (PathService::Get(base::DIR_MODULE, &module_path)) media::InitializeMediaLibrary(module_path); |