| Index: chrome/browser/chromeos/system/timezone_settings.cc
|
| diff --git a/chrome/browser/chromeos/system/timezone_settings.cc b/chrome/browser/chromeos/system/timezone_settings.cc
|
| index 03703a98fee07b975b5d8e7a1b35e4fbaf98ef5e..81aa03db1e3e017ca1a35d8ae48ce94e60b0b152 100644
|
| --- a/chrome/browser/chromeos/system/timezone_settings.cc
|
| +++ b/chrome/browser/chromeos/system/timezone_settings.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/chromeos/system/timezone_settings.h"
|
|
|
| +#include "base/bind.h"
|
| #include "base/file_path.h"
|
| #include "base/file_util.h"
|
| #include "base/logging.h"
|
| @@ -12,6 +13,7 @@
|
| #include "base/memory/singleton.h"
|
| #include "base/string_util.h"
|
| #include "base/utf_string_conversions.h"
|
| +#include "content/browser/browser_thread.h"
|
|
|
| namespace chromeos {
|
| namespace system {
|
| @@ -120,7 +122,12 @@ void TimezoneSettingsImpl::SetTimezone(const icu::TimeZone& timezone) {
|
| std::string id;
|
| UTF16ToUTF8(unicode.getBuffer(), unicode.length(), &id);
|
| VLOG(1) << "Setting timezone to " << id;
|
| - SetTimezoneIDFromString(id);
|
| + // Change the timezone config files on the FILE thread. It's safe to do this
|
| + // in the background as the following operations don't depend on the
|
| + // completion of the config change.
|
| + BrowserThread::PostTask(BrowserThread::FILE,
|
| + FROM_HERE,
|
| + base::Bind(&SetTimezoneIDFromString, id));
|
| icu::TimeZone::setDefault(timezone);
|
| FOR_EACH_OBSERVER(Observer, observers_, TimezoneChanged(timezone));
|
| }
|
|
|