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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/system_settings_provider.h

Issue 7867044: PART1: Initiated the SignedSettings refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased on ToT (solved merging conflict). Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_SETTINGS_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_SETTINGS_PROVIDER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_SETTINGS_PROVIDER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_SETTINGS_PROVIDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h"
10 #include "base/string16.h" 11 #include "base/string16.h"
11 #include "chrome/browser/chromeos/cros_settings_provider.h" 12 #include "chrome/browser/chromeos/cros_settings_provider.h"
12 #include "chrome/browser/chromeos/system/timezone_settings.h" 13 #include "chrome/browser/chromeos/system/timezone_settings.h"
13 #include "third_party/icu/public/i18n/unicode/timezone.h" 14 #include "third_party/icu/public/i18n/unicode/timezone.h"
14 15
15 namespace base { 16 namespace base {
16 class Value; 17 class Value;
17 class ListValue; 18 class ListValue;
19 class StringValue;
18 } 20 }
19 21
20 namespace chromeos { 22 namespace chromeos {
21 23
22 class SystemSettingsProvider : public CrosSettingsProvider, 24 class SystemSettingsProvider : public CrosSettingsProvider,
23 public system::TimezoneSettings::Observer { 25 public system::TimezoneSettings::Observer {
24 public: 26 public:
25 SystemSettingsProvider(); 27 SystemSettingsProvider();
26 virtual ~SystemSettingsProvider(); 28 virtual ~SystemSettingsProvider();
27 29
28 // CrosSettingsProvider overrides. 30 // CrosSettingsProvider overrides.
29 virtual bool Get(const std::string& path, 31 virtual const base::Value* Get(const std::string& path) const OVERRIDE;
30 base::Value** out_value) const OVERRIDE; 32 virtual bool GetTrusted(const std::string& path,
33 const base::Closure& callback) const OVERRIDE;
31 virtual bool HandlesSetting(const std::string& path) const OVERRIDE; 34 virtual bool HandlesSetting(const std::string& path) const OVERRIDE;
32 35
33 // Overridden from TimezoneSettings::Observer: 36 // Overridden from TimezoneSettings::Observer:
34 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE; 37 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE;
35 38
36 // Creates the map of timezones used by the options page. 39 // Creates the map of timezones used by the options page.
37 base::ListValue* GetTimezoneList(); 40 base::ListValue* GetTimezoneList();
38 41
39 private: 42 private:
40 // CrosSettingsProvider overrides. 43 // CrosSettingsProvider overrides.
(...skipping 12 matching lines...) Expand all
53 // rule of given |timezone|. 56 // rule of given |timezone|.
54 // One timezone could have multiple timezones, 57 // One timezone could have multiple timezones,
55 // e.g. 58 // e.g.
56 // US/Pacific == America/Los_Angeles 59 // US/Pacific == America/Los_Angeles
57 // We should always use the known timezone id when passing back as 60 // We should always use the known timezone id when passing back as
58 // pref values. 61 // pref values.
59 string16 GetKnownTimezoneID(const icu::TimeZone& timezone) const; 62 string16 GetKnownTimezoneID(const icu::TimeZone& timezone) const;
60 63
61 // Timezones. 64 // Timezones.
62 std::vector<icu::TimeZone*> timezones_; 65 std::vector<icu::TimeZone*> timezones_;
66 // TODO(pastarmovj): This will be cached into the local_store soon.
Mattias Nissler (ping if slow) 2011/11/18 14:12:00 What's the local_store? you mean local state PrefS
pastarmovj 2011/11/18 15:01:38 True. Changed.
67 mutable scoped_ptr<base::StringValue> system_timezone_;
63 68
64 DISALLOW_COPY_AND_ASSIGN(SystemSettingsProvider); 69 DISALLOW_COPY_AND_ASSIGN(SystemSettingsProvider);
65 }; 70 };
66 71
67 } // namespace chromeos 72 } // namespace chromeos
68 73
69 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_SETTINGS_PROVIDER_H_ 74 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698