| Index: chrome/browser/supervised_user/supervised_user_settings_service.h
|
| diff --git a/chrome/browser/managed_mode/managed_user_settings_service.h b/chrome/browser/supervised_user/supervised_user_settings_service.h
|
| similarity index 77%
|
| rename from chrome/browser/managed_mode/managed_user_settings_service.h
|
| rename to chrome/browser/supervised_user/supervised_user_settings_service.h
|
| index fdf789cd454778ffb3026a4b4e2a7574c8ce3f48..187f626d4e939fc73e69a05bf85d1d1fc5379c09 100644
|
| --- a/chrome/browser/managed_mode/managed_user_settings_service.h
|
| +++ b/chrome/browser/supervised_user/supervised_user_settings_service.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SETTINGS_SERVICE_H_
|
| -#define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SETTINGS_SERVICE_H_
|
| +#ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SETTINGS_SERVICE_H_
|
| +#define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SETTINGS_SERVICE_H_
|
|
|
| #include <string>
|
| #include <vector>
|
| @@ -13,7 +13,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/prefs/pref_store.h"
|
| #include "base/values.h"
|
| -#include "chrome/browser/managed_mode/managed_users.h"
|
| +#include "chrome/browser/supervised_user/supervised_users.h"
|
| #include "components/keyed_service/core/keyed_service.h"
|
| #include "sync/api/syncable_service.h"
|
|
|
| @@ -25,7 +25,7 @@ class FilePath;
|
| class SequencedTaskRunner;
|
| }
|
|
|
| -// This class syncs managed user settings from a server, which are mapped to
|
| +// This class syncs supervised user settings from a server, which are mapped to
|
| // preferences. The downloaded settings are persisted in a PrefStore (which is
|
| // not directly hooked up to the PrefService; it's just used internally).
|
| // Settings are key-value pairs, where the key uniquely identifies the setting.
|
| @@ -49,17 +49,17 @@ class SequencedTaskRunner;
|
| // }
|
| // would be encoded as two sync items, one with key "Moose:foo" and value "bar",
|
| // and one with key "Moose:baz" and value "blurp".
|
| -class ManagedUserSettingsService : public KeyedService,
|
| - public syncer::SyncableService,
|
| - public PrefStore::Observer {
|
| +class SupervisedUserSettingsService : public KeyedService,
|
| + public syncer::SyncableService,
|
| + public PrefStore::Observer {
|
| public:
|
| - // A callback whose first parameter is a dictionary containing all managed
|
| + // A callback whose first parameter is a dictionary containing all supervised
|
| // user settings. If the dictionary is NULL, it means that the service is
|
| - // inactive, i.e. the user is not managed.
|
| + // inactive, i.e. the user is not supervised.
|
| typedef base::Callback<void(const base::DictionaryValue*)> SettingsCallback;
|
|
|
| - ManagedUserSettingsService();
|
| - virtual ~ManagedUserSettingsService();
|
| + SupervisedUserSettingsService();
|
| + virtual ~SupervisedUserSettingsService();
|
|
|
| // Initializes the service by loading its settings from a file underneath the
|
| // |profile_path|. File I/O will be serialized via the
|
| @@ -74,28 +74,28 @@ class ManagedUserSettingsService : public KeyedService,
|
| // default one.
|
| void Init(scoped_refptr<PersistentPrefStore> pref_store);
|
|
|
| - // Adds a callback to be called when managed user settings are initially
|
| + // Adds a callback to be called when supervised user settings are initially
|
| // available, or when they change.
|
| void Subscribe(const SettingsCallback& callback);
|
|
|
| - // Activates/deactivates the service. This is called by the ManagedUserService
|
| - // when it is (de)activated.
|
| + // Activates/deactivates the service. This is called by the
|
| + // SupervisedUserService when it is (de)activated.
|
| void SetActive(bool active);
|
|
|
| - // Whether managed user settings are available.
|
| + // Whether supervised user settings are available.
|
| bool IsReady();
|
|
|
| - // Clears all managed user settings and items.
|
| + // Clears all supervised user settings and items.
|
| void Clear();
|
|
|
| - // Constructs a key for a split managed user setting from a prefix and a
|
| + // Constructs a key for a split supervised user setting from a prefix and a
|
| // variable key.
|
| static std::string MakeSplitSettingKey(const std::string& prefix,
|
| const std::string& key);
|
|
|
| // Uploads an item to the Sync server. Items are the same data structure as
|
| - // managed user settings (i.e. key-value pairs, as described at the top of
|
| - // the file), but they are only uploaded (whereas managed user settings are
|
| + // supervised user settings (i.e. key-value pairs, as described at the top of
|
| + // the file), but they are only uploaded (whereas supervised user settings are
|
| // only downloaded), and never passed to the preference system.
|
| // An example of an uploaded item is an access request to a blocked URL.
|
| void UploadItem(const std::string& key, scoped_ptr<base::Value> value);
|
| @@ -135,12 +135,12 @@ class ManagedUserSettingsService : public KeyedService,
|
| base::DictionaryValue* GetQueuedItems() const;
|
|
|
| // Returns the dictionary where a given Sync item should be stored, depending
|
| - // on whether the managed user setting is atomic or split. In case of a split
|
| - // setting, the split setting prefix of |key| is removed, so that |key| can
|
| - // be used to update the returned dictionary.
|
| + // on whether the supervised user setting is atomic or split. In case of a
|
| + // split setting, the split setting prefix of |key| is removed, so that |key|
|
| + // can be used to update the returned dictionary.
|
| base::DictionaryValue* GetDictionaryAndSplitKey(std::string* key) const;
|
|
|
| - // Returns a dictionary with all managed user settings if the service is
|
| + // Returns a dictionary with all supervised user settings if the service is
|
| // active, or NULL otherwise.
|
| scoped_ptr<base::DictionaryValue> GetSettings();
|
|
|
| @@ -162,7 +162,7 @@ class ManagedUserSettingsService : public KeyedService,
|
| scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
|
| scoped_ptr<syncer::SyncErrorFactory> error_handler_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(ManagedUserSettingsService);
|
| + DISALLOW_COPY_AND_ASSIGN(SupervisedUserSettingsService);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SETTINGS_SERVICE_H_
|
| +#endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SETTINGS_SERVICE_H_
|
|
|