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

Unified Diff: chrome/browser/chromeos/settings/device_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: Rearrange device settings list. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/settings/device_settings_provider.h
diff --git a/chrome/browser/chromeos/settings/device_settings_provider.h b/chrome/browser/chromeos/settings/device_settings_provider.h
index 4705e6176feefe80faa47e6bff9697e0eeb56199..b864748b52e1ab2bd044f7352d8e472c0dc15208 100644
--- a/chrome/browser/chromeos/settings/device_settings_provider.h
+++ b/chrome/browser/chromeos/settings/device_settings_provider.h
@@ -53,6 +53,8 @@ class DeviceSettingsProvider
TrustedStatus PrepareTrustedValues(const base::Closure& callback) override;
bool HandlesSetting(const std::string& path) const override;
+ void set_trusted_for_test(bool trusted) { trusted_for_test_ = trusted; }
+
private:
// CrosSettingsProvider implementation:
void DoSet(const std::string& path, const base::Value& value) override;
@@ -123,6 +125,9 @@ class DeviceSettingsProvider
TrustedStatus trusted_status_;
DeviceSettingsService::OwnershipStatus ownership_status_;
+ // Allows to skip waiting for the trusted values in unit tests.
+ bool trusted_for_test_;
+
// The device settings as currently reported through the
// CrosSettingsProvider interface. This may be different from the
// actual current device settings (which can be obtained from

Powered by Google App Engine
This is Rietveld 408576698