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

Unified Diff: chrome/browser/chromeos/system/timezone_settings.cc

Issue 7904012: Make file IO occur on the right thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bda09f80b7f7629ce33906f56dca50745fa997ad 100644
--- a/chrome/browser/chromeos/system/timezone_settings.cc
+++ b/chrome/browser/chromeos/system/timezone_settings.cc
@@ -12,6 +12,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 +121,9 @@ void TimezoneSettingsImpl::SetTimezone(const icu::TimeZone& timezone) {
std::string id;
UTF16ToUTF8(unicode.getBuffer(), unicode.length(), &id);
VLOG(1) << "Setting timezone to " << id;
- SetTimezoneIDFromString(id);
+ BrowserThread::PostTask(BrowserThread::FILE,
satorux1 2011/09/19 16:49:03 I think it's safe to do SetTimezoneIDFromString()
pastarmovj 2011/09/20 12:04:12 Done.
+ FROM_HERE,
+ NewRunnableFunction(&SetTimezoneIDFromString, id));
satorux1 2011/09/19 16:49:03 Can you use base::Bind() instead? NewRunnableFunct
pastarmovj 2011/09/20 12:04:12 Done.
icu::TimeZone::setDefault(timezone);
FOR_EACH_OBSERVER(Observer, observers_, TimezoneChanged(timezone));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698