1 // Copyright 2014 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_OWNERSHIP_FAKE_OWNER_SETTINGS_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_OWNERSHIP_FAKE_OWNER_SETTINGS_SERVICE_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
20 class StubCrosSettingsProvider
;
22 class FakeOwnerSettingsService
: public OwnerSettingsServiceChromeOS
{
24 explicit FakeOwnerSettingsService(Profile
* profile
);
25 FakeOwnerSettingsService(
27 const scoped_refptr
<ownership::OwnerKeyUtil
>& owner_key_util
,
28 StubCrosSettingsProvider
* provider
);
29 ~FakeOwnerSettingsService() override
;
31 void set_set_management_settings_result(bool success
) {
32 set_management_settings_result_
= success
;
35 const ManagementSettings
& last_settings() const {
36 return last_settings_
;
39 // OwnerSettingsServiceChromeOS:
40 void SetManagementSettings(
41 const ManagementSettings
& settings
,
42 const OnManagementSettingsSetCallback
& callback
) override
;
43 bool Set(const std::string
& setting
, const base::Value
& value
) override
;
46 bool set_management_settings_result_
;
47 ManagementSettings last_settings_
;
48 StubCrosSettingsProvider
* settings_provider_
;
50 DISALLOW_COPY_AND_ASSIGN(FakeOwnerSettingsService
);
53 } // namespace chromeos
55 #endif // CHROME_BROWSER_CHROMEOS_OWNERSHIP_FAKE_OWNER_SETTINGS_SERVICE_H_