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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_SETTINGS_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_SETTINGS_PROVIDER_H_
7
8 #include <vector>
9
10 #include "base/string16.h"
11 #include "chrome/browser/chromeos/cros/system_library.h"
12 #include "chrome/browser/chromeos/cros_settings_provider.h"
13 #include "third_party/icu/public/i18n/unicode/timezone.h"
14
15 class Value;
16 class ListValue;
17
18 namespace chromeos {
19
20 class SystemSettingsProvider : public CrosSettingsProvider,
21 public SystemLibrary::Observer {
22 public:
23 SystemSettingsProvider();
24 virtual ~SystemSettingsProvider();
25
26 // CrosSettingsProvider overrides.
27 virtual void Set(const std::string& path, Value* in_value);
28 virtual bool Get(const std::string& path, Value** out_value) const;
29 virtual bool HandlesSetting(const std::string& path);
30
31 // Overridden from SystemLibrary::Observer:
32 virtual void TimezoneChanged(const icu::TimeZone& timezone);
33
34 // Creates the map of timezones used by the options page.
35 ListValue* GetTimezoneList();
36
37 private:
38
39 // Gets timezone name.
40 static string16 GetTimezoneName(const icu::TimeZone& timezone);
41
42 // Gets timezone ID which is also used as timezone pref value.
43 static string16 GetTimezoneID(const icu::TimeZone& timezone);
44
45 // Gets timezone object from its id.
46 const icu::TimeZone* GetTimezone(const string16& timezone_id);
47
48 // Timezones.
49 std::vector<icu::TimeZone*> timezones_;
50
51 DISALLOW_COPY_AND_ASSIGN(SystemSettingsProvider);
52 };
53
54 } // namespace chromeos
55
56 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698