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

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

Issue 10832035: Switch from SignedSettings to DeviceSettingsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More test fixing... Created 8 years, 5 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/signed_settings_migration_helper.h
diff --git a/chrome/browser/chromeos/signed_settings_migration_helper.h b/chrome/browser/chromeos/signed_settings_migration_helper.h
index 5c19b9af5b6990ba29de80002c9049772a517b06..fd302901c0af2fb5959f9cdb05fcd01bf6845d74 100644
--- a/chrome/browser/chromeos/signed_settings_migration_helper.h
+++ b/chrome/browser/chromeos/signed_settings_migration_helper.h
@@ -6,11 +6,8 @@
#define CHROME_BROWSER_CHROMEOS_SIGNED_SETTINGS_MIGRATION_HELPER_H_
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/chromeos/login/ownership_service.h"
-#include "chrome/browser/chromeos/login/signed_settings_helper.h"
+#include "chrome/browser/chromeos/login/device_settings_service.h"
#include "chrome/browser/prefs/pref_value_map.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
namespace base {
class Value;
@@ -20,11 +17,10 @@ namespace chromeos {
// This class provides the means to migrate settings to the signed settings
// store. It does one of three things - store the settings in the policy blob
-// immediately if the current user is the owner. Uses the
-// SignedSettingsCache if there is no owner yet, or waits for an
-// OWNERSHIP_CHECKED notification to delay the storing until the owner has
-// logged in.
-class SignedSettingsMigrationHelper : public content::NotificationObserver {
+// immediately if the current user is the owner. Uses the SignedSettingsCache if
+// there is no owner yet, or waits for an call from DeviceSettingsProvider to
+// delay the storing until the owner has logged in.
+class SignedSettingsMigrationHelper {
public:
SignedSettingsMigrationHelper();
virtual ~SignedSettingsMigrationHelper();
@@ -37,17 +33,11 @@ class SignedSettingsMigrationHelper : public content::NotificationObserver {
// migration then.
void MigrateValues(void);
- // NotificationObserver overrides:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
private:
// Does the actual migration when ownership has been confirmed.
- void DoMigrateValues(OwnershipService::Status status,
+ void DoMigrateValues(DeviceSettingsService::OwnershipStatus status,
bool current_user_is_owner);
- content::NotificationRegistrar registrar_;
base::WeakPtrFactory<SignedSettingsMigrationHelper> ptr_factory_;
PrefValueMap migration_values_;

Powered by Google App Engine
This is Rietveld 408576698