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

Unified Diff: chrome/browser/chromeos/dom_ui/system_settings_provider.h

Issue 3143009: Reenabled ChromeOS system setting for timezone selection.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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/dom_ui/system_settings_provider.h
===================================================================
--- chrome/browser/chromeos/dom_ui/system_settings_provider.h (revision 0)
+++ chrome/browser/chromeos/dom_ui/system_settings_provider.h (revision 0)
@@ -0,0 +1,56 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_SETTINGS_PROVIDER_H_
+#define CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_SETTINGS_PROVIDER_H_
+
+#include <vector>
+
+#include "base/string16.h"
+#include "chrome/browser/chromeos/cros/system_library.h"
+#include "chrome/browser/chromeos/cros_settings_provider.h"
+#include "third_party/icu/public/i18n/unicode/timezone.h"
+
+class Value;
+class ListValue;
+
+namespace chromeos {
+
+class SystemSettingsProvider : public CrosSettingsProvider,
+ public SystemLibrary::Observer {
+ public:
+ SystemSettingsProvider();
+ virtual ~SystemSettingsProvider();
+
+ // CrosSettingsProvider overrides.
+ virtual void Set(const std::string& path, Value* in_value);
+ virtual bool Get(const std::string& path, Value** out_value) const;
+ virtual bool HandlesSetting(const std::string& path);
+
+ // Overridden from SystemLibrary::Observer:
+ virtual void TimezoneChanged(const icu::TimeZone& timezone);
+
+ // Creates the map of timezones used by the options page.
+ ListValue* GetTimezoneList();
+
+ private:
+
+ // Gets timezone name.
+ static string16 GetTimezoneName(const icu::TimeZone& timezone);
+
+ // Gets timezone ID which is also used as timezone pref value.
+ static string16 GetTimezoneID(const icu::TimeZone& timezone);
+
+ // Gets timezone object from its id.
+ const icu::TimeZone* GetTimezone(const string16& timezone_id);
+
+ // Timezones.
+ std::vector<icu::TimeZone*> timezones_;
+
+ DISALLOW_COPY_AND_ASSIGN(SystemSettingsProvider);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_SETTINGS_PROVIDER_H_
Property changes on: chrome/browser/chromeos/dom_ui/system_settings_provider.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698