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

Unified Diff: chrome/browser/chromeos/settings/stub_cros_settings_provider.h

Issue 1019283004: Switch to direct use of OwnerSettingsServiceChromeOS::Set() in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify a bit. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/settings/stub_cros_settings_provider.h
diff --git a/chrome/browser/chromeos/settings/stub_cros_settings_provider.h b/chrome/browser/chromeos/settings/stub_cros_settings_provider.h
index 5fcb65c18f2db8f3a4762c27354b016d35952fbe..141af9d04c7bd453bc673eb369a449d7a66ab50e 100644
--- a/chrome/browser/chromeos/settings/stub_cros_settings_provider.h
+++ b/chrome/browser/chromeos/settings/stub_cros_settings_provider.h
@@ -24,6 +24,9 @@ class StubCrosSettingsProvider : public CrosSettingsProvider {
TrustedStatus PrepareTrustedValues(const base::Closure& callback) override;
bool HandlesSetting(const std::string& path) const override;
+ void SetTrustedStatus(TrustedStatus status);
+ void SetCurrentUserIsOwner(bool owner);
+
private:
// CrosSettingsProvider implementation:
void DoSet(const std::string& path, const base::Value& value) override;
@@ -34,6 +37,15 @@ class StubCrosSettingsProvider : public CrosSettingsProvider {
// In-memory settings storage.
PrefValueMap values_;
+ // By default, every value from Set is written. However, in some cases (e.g.
+ // enterprise-managed) it is required to retain current settings, but notify
+ // about the attempted change. That's what happens when the current user is
+ // not the owner.
+ bool current_user_is_owner_;
+
+ // Default value is TRUSTED
Mattias Nissler (ping if slow) 2015/04/07 12:59:18 nit: Missing period.
+ TrustedStatus trusted_status_;
+
DISALLOW_COPY_AND_ASSIGN(StubCrosSettingsProvider);
};

Powered by Google App Engine
This is Rietveld 408576698