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

Unified Diff: chrome/browser/chromeos/login/base_login_display_host.cc

Issue 10689175: Refactored code for timezone settings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added missing comment. Created 8 years, 5 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
Index: chrome/browser/chromeos/login/base_login_display_host.cc
diff --git a/chrome/browser/chromeos/login/base_login_display_host.cc b/chrome/browser/chromeos/login/base_login_display_host.cc
index 557d154f23f092f82054ed998437ce558997cd5f..ee2524535807c7deb4da0b20e0d17a305501393f 100644
--- a/chrome/browser/chromeos/login/base_login_display_host.cc
+++ b/chrome/browser/chromeos/login/base_login_display_host.cc
@@ -11,6 +11,7 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/threading/thread_restrictions.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
@@ -50,7 +51,6 @@
#include "ui/gfx/rect.h"
#include "ui/gfx/transform.h"
#include "ui/views/widget/widget.h"
-#include "unicode/timezone.h"
namespace {
@@ -566,10 +566,8 @@ void ShowLoginWizard(const std::string& first_screen_name,
// Apply locale customizations only once to preserve whatever locale
// user has changed to during OOBE.
if (!timezone_name.empty()) {
- icu::TimeZone* timezone = icu::TimeZone::createTimeZone(
- icu::UnicodeString::fromUTF8(timezone_name));
- CHECK(timezone) << "Timezone could not be set for " << timezone_name;
- chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone);
+ chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID(
+ UTF8ToUTF16(timezone_name));
}
}
« no previous file with comments | « chrome/browser/chromeos/device_settings_provider.cc ('k') | chrome/browser/chromeos/system/timezone_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698