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

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

Issue 8727037: Signed settings refactoring: Proper caching and more tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to ToT and removed some debug output left. Created 9 years 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/callback.h"
(...skipping 10 matching lines...) Expand all
21 21
22 namespace chromeos { 22 namespace chromeos {
23 23
24 class SystemSettingsProvider : public CrosSettingsProvider, 24 class SystemSettingsProvider : public CrosSettingsProvider,
25 public system::TimezoneSettings::Observer { 25 public system::TimezoneSettings::Observer {
26 public: 26 public:
27 SystemSettingsProvider(); 27 SystemSettingsProvider();
28 virtual ~SystemSettingsProvider(); 28 virtual ~SystemSettingsProvider();
29 29
30 // CrosSettingsProvider overrides. 30 // CrosSettingsProvider overrides.
31 virtual const base::Value* Get(const std::string& path) const OVERRIDE; 31 virtual base::Value* Get(const std::string& path) const OVERRIDE;
32 virtual bool GetTrusted(const std::string& path, 32 virtual bool GetTrusted(const std::string& path,
33 const base::Closure& callback) const OVERRIDE; 33 const base::Closure& callback) OVERRIDE;
34 virtual bool HandlesSetting(const std::string& path) const OVERRIDE; 34 virtual bool HandlesSetting(const std::string& path) const OVERRIDE;
35 virtual void Reload() OVERRIDE;
35 36
36 // Overridden from TimezoneSettings::Observer: 37 // Overridden from TimezoneSettings::Observer:
37 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE; 38 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE;
38 39
39 // Creates the map of timezones used by the options page. 40 // Creates the map of timezones used by the options page.
40 base::ListValue* GetTimezoneList(); 41 base::ListValue* GetTimezoneList();
41 42
42 private: 43 private:
43 // CrosSettingsProvider overrides. 44 // CrosSettingsProvider overrides.
44 virtual void DoSet(const std::string& path, 45 virtual void DoSet(const std::string& path,
(...skipping 12 matching lines...) Expand all
57 // rule of given |timezone|. 58 // rule of given |timezone|.
58 // One timezone could have multiple timezones, 59 // One timezone could have multiple timezones,
59 // e.g. 60 // e.g.
60 // US/Pacific == America/Los_Angeles 61 // US/Pacific == America/Los_Angeles
61 // We should always use the known timezone id when passing back as 62 // We should always use the known timezone id when passing back as
62 // pref values. 63 // pref values.
63 string16 GetKnownTimezoneID(const icu::TimeZone& timezone) const; 64 string16 GetKnownTimezoneID(const icu::TimeZone& timezone) const;
64 65
65 // Timezones. 66 // Timezones.
66 std::vector<icu::TimeZone*> timezones_; 67 std::vector<icu::TimeZone*> timezones_;
67 // TODO(pastarmovj): This will be cached in the local_state PrefStore soon.
68 mutable scoped_ptr<base::StringValue> system_timezone_;
69 68
70 DISALLOW_COPY_AND_ASSIGN(SystemSettingsProvider); 69 DISALLOW_COPY_AND_ASSIGN(SystemSettingsProvider);
71 }; 70 };
72 71
73 } // namespace chromeos 72 } // namespace chromeos
74 73
75 #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