Chromium Code Reviews| Index: chrome/browser/chromeos/login/signed_settings_temp_storage.cc |
| diff --git a/chrome/browser/chromeos/login/signed_settings_temp_storage.cc b/chrome/browser/chromeos/login/signed_settings_temp_storage.cc |
| index 4182ff9c1633ca3542ee84e0aa22f9888b1c2c5c..021b3aafeade24edb18cbc8059512fe90ea10225 100644 |
| --- a/chrome/browser/chromeos/login/signed_settings_temp_storage.cc |
| +++ b/chrome/browser/chromeos/login/signed_settings_temp_storage.cc |
| @@ -20,13 +20,13 @@ void SignedSettingsTempStorage::RegisterPrefs(PrefService* local_state) { |
| // static |
| bool SignedSettingsTempStorage::Store(const std::string& name, |
| - const std::string& value, |
| + const base::Value& value, |
| PrefService* local_state) { |
| if (local_state) { |
| DictionaryPrefUpdate temp_storage_update( |
| local_state, prefs::kSignedSettingsTempStorage); |
| temp_storage_update->SetWithoutPathExpansion( |
| - name, Value::CreateStringValue(value)); |
| + name, value.DeepCopy()); |
| return true; |
| } |
| return false; |
| @@ -34,13 +34,13 @@ bool SignedSettingsTempStorage::Store(const std::string& name, |
| // static |
| bool SignedSettingsTempStorage::Retrieve(const std::string& name, |
| - std::string* value, |
| + base::Value** value, |
| PrefService* local_state) { |
| if (local_state) { |
| const DictionaryValue* temp_storage = |
| local_state->GetDictionary(prefs::kSignedSettingsTempStorage); |
| if (temp_storage && temp_storage->HasKey(name)) { |
| - temp_storage->GetStringWithoutPathExpansion(name, value); |
| + temp_storage->GetWithoutPathExpansion(name, value); |
| return true; |
| } |
| } |
| @@ -61,9 +61,9 @@ void SignedSettingsTempStorage::Finalize(PrefService* local_state) { |
| for (DictionaryValue::key_iterator it = temp_storage->begin_keys(); |
| it != temp_storage->end_keys(); |
| ++it) { |
| - std::string value; |
| - temp_storage->GetStringWithoutPathExpansion(*it, &value); |
| - SignedSettingsHelper::Get()->StartStorePropertyOp(*it, value, NULL); |
| + base::Value* value; |
| + temp_storage->GetWithoutPathExpansion(*it, &value); |
|
Denis Lagno
2011/10/13 13:43:10
value contains garbage initially, and you do not c
pastarmovj
2011/10/26 15:44:59
Done.
|
| + SignedSettingsHelper::Get()->StartStorePropertyOp(*it, *value, NULL); |
| } |
| local_state->ClearPref(prefs::kSignedSettingsTempStorage); |
| } |