#ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SHARED_SETTINGS_UPDATE_H_
#define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SHARED_SETTINGS_UPDATE_H_
#include <string>
#include "base/callback.h"
#include "base/callback_list.h"
#include "base/memory/scoped_ptr.h"
namespace base {
class Value;
}
class ManagedUserSharedSettingsService;
class ManagedUserSharedSettingsUpdate {
public:
ManagedUserSharedSettingsUpdate(
ManagedUserSharedSettingsService* service,
const std::string& mu_id,
const std::string& key,
scoped_ptr<base::Value> value,
const base::Callback<void(bool)>& success_callback);
~ManagedUserSharedSettingsUpdate();
private:
typedef base::CallbackList<void(const std::string&, const std::string&)>
CallbackList;
void OnSettingChanged(const std::string& mu_id,
const std::string& key);
ManagedUserSharedSettingsService* service_;
std::string mu_id_;
std::string key_;
scoped_ptr<base::Value> value_;
base::Callback<void(bool)> callback_;
scoped_ptr<CallbackList::Subscription> subscription_;
};
#endif