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_
10 #include "base/prefs/pref_value_map.h"
11 #include "chromeos/settings/cros_settings_provider.h"
17 // CrosSettingsProvider implementation that stores settings in memory unsigned.
18 class StubCrosSettingsProvider
: public CrosSettingsProvider
{
20 explicit StubCrosSettingsProvider(const NotifyObserversCallback
& notify_cb
);
21 StubCrosSettingsProvider();
22 virtual ~StubCrosSettingsProvider();
24 // CrosSettingsProvider implementation.
25 virtual const base::Value
* Get(const std::string
& path
) const override
;
26 virtual TrustedStatus
PrepareTrustedValues(
27 const base::Closure
& callback
) override
;
28 virtual bool HandlesSetting(const std::string
& path
) const override
;
31 // CrosSettingsProvider implementation:
32 virtual void DoSet(const std::string
& path
,
33 const base::Value
& value
) override
;
35 // Initializes settings to their defaults.
38 // In-memory settings storage.
41 CrosSettings
* cros_settings_
;
43 DISALLOW_COPY_AND_ASSIGN(StubCrosSettingsProvider
);
46 } // namespace chromeos
48 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_STUB_CROS_SETTINGS_PROVIDER_H_