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

Side by Side Diff: chrome/browser/chromeos/settings/system_settings_provider.h

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHROMEOS_SETTINGS_SYSTEM_SETTINGS_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_SYSTEM_SETTINGS_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_SYSTEM_SETTINGS_PROVIDER_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_SYSTEM_SETTINGS_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "chromeos/settings/cros_settings_provider.h" 13 #include "chromeos/settings/cros_settings_provider.h"
14 #include "chromeos/settings/timezone_settings.h" 14 #include "chromeos/settings/timezone_settings.h"
15 #include "third_party/icu/source/i18n/unicode/timezone.h" 15 #include "third_party/icu/source/i18n/unicode/timezone.h"
16 16
17 namespace base { 17 namespace base {
18 class Value; 18 class Value;
19 using StringValue = Value;
20 } 19 }
21 20
22 namespace chromeos { 21 namespace chromeos {
23 22
24 class SystemSettingsProvider : public CrosSettingsProvider, 23 class SystemSettingsProvider : public CrosSettingsProvider,
25 public system::TimezoneSettings::Observer { 24 public system::TimezoneSettings::Observer {
26 public: 25 public:
27 explicit SystemSettingsProvider(const NotifyObserversCallback& notify_cb); 26 explicit SystemSettingsProvider(const NotifyObserversCallback& notify_cb);
28 ~SystemSettingsProvider() override; 27 ~SystemSettingsProvider() override;
29 28
30 // CrosSettingsProvider implementation. 29 // CrosSettingsProvider implementation.
31 const base::Value* Get(const std::string& path) const override; 30 const base::Value* Get(const std::string& path) const override;
32 TrustedStatus PrepareTrustedValues(const base::Closure& callback) override; 31 TrustedStatus PrepareTrustedValues(const base::Closure& callback) override;
33 bool HandlesSetting(const std::string& path) const override; 32 bool HandlesSetting(const std::string& path) const override;
34 33
35 // TimezoneSettings::Observer implementation. 34 // TimezoneSettings::Observer implementation.
36 void TimezoneChanged(const icu::TimeZone& timezone) override; 35 void TimezoneChanged(const icu::TimeZone& timezone) override;
37 36
38 private: 37 private:
39 // CrosSettingsProvider implementation. 38 // CrosSettingsProvider implementation.
40 void DoSet(const std::string& path, const base::Value& in_value) override; 39 void DoSet(const std::string& path, const base::Value& in_value) override;
41 40
42 std::unique_ptr<base::StringValue> timezone_value_; 41 std::unique_ptr<base::Value> timezone_value_;
43 42
44 DISALLOW_COPY_AND_ASSIGN(SystemSettingsProvider); 43 DISALLOW_COPY_AND_ASSIGN(SystemSettingsProvider);
45 }; 44 };
46 45
47 } // namespace chromeos 46 } // namespace chromeos
48 47
49 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_SYSTEM_SETTINGS_PROVIDER_H_ 48 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_SYSTEM_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698