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

Unified Diff: chrome/browser/chromeos/device_settings_provider.h

Issue 9703115: Add DeviceSettingProvider unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed copyright header. Created 8 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
« no previous file with comments | « chrome/browser/chromeos/cros_settings.cc ('k') | chrome/browser/chromeos/device_settings_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bbd5e4c82a13e5f818aa784aba33f72d9b76dccf..98496a27e8e3184839984083e8ba6db1f2cb0c3f 100644
--- a/chrome/browser/chromeos/device_settings_provider.h
+++ b/chrome/browser/chromeos/device_settings_provider.h
@@ -30,7 +30,8 @@ namespace chromeos {
class DeviceSettingsProvider : public CrosSettingsProvider,
public content::NotificationObserver {
public:
- explicit DeviceSettingsProvider(const NotifyObserversCallback& notify_cb);
+ explicit DeviceSettingsProvider(const NotifyObserversCallback& notify_cb,
+ SignedSettingsHelper* signed_settings_helper);
virtual ~DeviceSettingsProvider();
// CrosSettingsProvider implementation.
@@ -39,6 +40,12 @@ class DeviceSettingsProvider : public CrosSettingsProvider,
virtual bool HandlesSetting(const std::string& path) const OVERRIDE;
virtual void Reload() OVERRIDE;
+ protected:
+ // For test use only.
+ void set_ownership_status(OwnershipService::Status status) {
+ ownership_status_ = status;
+ }
+
private:
// CrosSettingsProvider implementation:
virtual void DoSet(const std::string& path,
@@ -125,6 +132,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_;
@@ -143,6 +151,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);
};
« no previous file with comments | « chrome/browser/chromeos/cros_settings.cc ('k') | chrome/browser/chromeos/device_settings_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698