Index: chrome/browser/chromeos/device_settings_provider.h |
diff --git a/chrome/browser/chromeos/device_settings_provider.h b/chrome/browser/chromeos/device_settings_provider.h |
index 4794b5380f082e3b0b24003da6cd21827991e9d2..58e3e373f1c823fe2128ad1d7e59a4c0d6ec4b50 100644 |
--- a/chrome/browser/chromeos/device_settings_provider.h |
+++ b/chrome/browser/chromeos/device_settings_provider.h |
@@ -40,7 +40,20 @@ class DeviceSettingsProvider : public CrosSettingsProvider, |
virtual bool HandlesSetting(const std::string& path) const OVERRIDE; |
virtual void Reload() OVERRIDE; |
+ protected: |
+ // Constructor that does the real initialization and can also be used by tests |
+ // to mock the low level servers of this class. |
+ DeviceSettingsProvider(const NotifyObserversCallback& notify_cb, |
+ SignedSettingsHelper* signed_settings_helper, |
+ OwnershipService::Status ownership_service); |
+ |
+ void set_ownership_status(OwnershipService::Status status) { |
+ ownership_status_ = status; |
+ } |
+ |
private: |
+ void Initialize(); |
+ |
// CrosSettingsProvider implementation: |
virtual void DoSet(const std::string& path, |
const base::Value& value) OVERRIDE; |
@@ -126,6 +139,7 @@ class DeviceSettingsProvider : public CrosSettingsProvider, |
// Pending callbacks that need to be invoked after settings verification. |
std::vector<base::Closure> callbacks_; |
+ SignedSettingsHelper* signed_settings_helper_; |
OwnershipService::Status ownership_status_; |
mutable scoped_ptr<SignedSettingsMigrationHelper> migration_helper_; |
@@ -144,6 +158,9 @@ class DeviceSettingsProvider : public CrosSettingsProvider, |
typedef std::pair<std::string, base::Value*> PendingQueueElement; |
std::vector<PendingQueueElement> pending_changes_; |
+ friend class DeviceSettingsProviderTest; |
+ FRIEND_TEST_ALL_PREFIXES(DeviceSettingsProviderTest, |
+ InitializationTestUnowned); |
DISALLOW_COPY_AND_ASSIGN(DeviceSettingsProvider); |
}; |