Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / chromeos / settings / stub_cros_settings_provider.h
blob5fcb65c18f2db8f3a4762c27354b016d35952fbe
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_STUB_CROS_SETTINGS_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_STUB_CROS_SETTINGS_PROVIDER_H_
8 #include <string>
10 #include "base/prefs/pref_value_map.h"
11 #include "chromeos/settings/cros_settings_provider.h"
13 namespace chromeos {
15 // CrosSettingsProvider implementation that stores settings in memory unsigned.
16 class StubCrosSettingsProvider : public CrosSettingsProvider {
17 public:
18 explicit StubCrosSettingsProvider(const NotifyObserversCallback& notify_cb);
19 StubCrosSettingsProvider();
20 ~StubCrosSettingsProvider() override;
22 // CrosSettingsProvider implementation.
23 const base::Value* Get(const std::string& path) const override;
24 TrustedStatus PrepareTrustedValues(const base::Closure& callback) override;
25 bool HandlesSetting(const std::string& path) const override;
27 private:
28 // CrosSettingsProvider implementation:
29 void DoSet(const std::string& path, const base::Value& value) override;
31 // Initializes settings to their defaults.
32 void SetDefaults();
34 // In-memory settings storage.
35 PrefValueMap values_;
37 DISALLOW_COPY_AND_ASSIGN(StubCrosSettingsProvider);
40 } // namespace chromeos
42 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_STUB_CROS_SETTINGS_PROVIDER_H_