Index: chrome/browser/chromeos/login/signed_settings_helper.cc |
diff --git a/chrome/browser/chromeos/login/signed_settings_helper.cc b/chrome/browser/chromeos/login/signed_settings_helper.cc |
index b641b786c9d2681690ec6265f61e0349fba683d6..6822e14903ba203227a54908e3e289076fe904e9 100644 |
--- a/chrome/browser/chromeos/login/signed_settings_helper.cc |
+++ b/chrome/browser/chromeos/login/signed_settings_helper.cc |
@@ -168,12 +168,12 @@ class StorePropertyOpContext : public SignedSettings::Delegate<bool>, |
public OpContext { |
public: |
StorePropertyOpContext(const std::string& name, |
- const std::string& value, |
+ const base::Value& value, |
SignedSettingsHelper::Callback* callback, |
OpContext::Delegate* delegate) |
: OpContext(callback, delegate), |
name_(name), |
- value_(value) { |
+ value_(value.DeepCopy()) { |
} |
// chromeos::SignedSettings::Delegate implementation |
@@ -181,25 +181,25 @@ class StorePropertyOpContext : public SignedSettings::Delegate<bool>, |
bool unused) OVERRIDE { |
VLOG(2) << "OnSettingsOpCompleted, code = " << code; |
if (callback_) |
- callback_->OnStorePropertyCompleted(code, name_, value_); |
+ callback_->OnStorePropertyCompleted(code, name_, *value_); |
OnOpCompleted(); |
} |
protected: |
// OpContext implemenetation |
virtual void CreateOp() OVERRIDE { |
- op_ = SignedSettings::CreateStorePropertyOp(name_, value_, this); |
+ op_ = SignedSettings::CreateStorePropertyOp(name_, *value_, this); |
} |
private: |
std::string name_; |
- std::string value_; |
+ scoped_ptr<base::Value> value_; |
DISALLOW_COPY_AND_ASSIGN(StorePropertyOpContext); |
}; |
class RetrievePropertyOpContext |
- : public SignedSettings::Delegate<std::string>, |
+ : public SignedSettings::Delegate<const base::Value&>, |
public OpContext { |
public: |
RetrievePropertyOpContext(const std::string& name, |
@@ -211,7 +211,7 @@ class RetrievePropertyOpContext |
// chromeos::SignedSettings::Delegate implementation |
virtual void OnSettingsOpCompleted(SignedSettings::ReturnCode code, |
- std::string value) OVERRIDE { |
+ const base::Value& value) OVERRIDE { |
if (callback_) |
callback_->OnRetrievePropertyCompleted(code, name_, value); |
@@ -301,7 +301,7 @@ class SignedSettingsHelperImpl : public SignedSettingsHelper, |
bool add_to_whitelist, |
Callback* callback) OVERRIDE; |
virtual void StartStorePropertyOp(const std::string& name, |
- const std::string& value, |
+ const base::Value& value, |
Callback* callback) OVERRIDE; |
virtual void StartRetrieveProperty(const std::string& name, |
Callback* callback) OVERRIDE; |
@@ -365,7 +365,7 @@ void SignedSettingsHelperImpl::StartWhitelistOp( |
void SignedSettingsHelperImpl::StartStorePropertyOp( |
const std::string& name, |
- const std::string& value, |
+ const base::Value& value, |
SignedSettingsHelper::Callback* callback) { |
AddOpContext(new StorePropertyOpContext( |
name, |