Commit d94a5193 authored by gab@chromium.org's avatar gab@chromium.org

All Get/Set using the hash_store_id as a key should use *WithoutPathExpansion methods

BUG=349463

Review URL: https://codereview.chromium.org/187443007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255227 0039d316-1c4b-4281-b951-d872f2087c98
parent 2b73d520
......@@ -95,13 +95,13 @@ void PrefHashStoreImpl::Reset() {
// Remove this store's entry in the kStoreVersionsDict.
base::DictionaryValue* version_dict;
if (update->GetDictionary(internals::kStoreVersionsDict, &version_dict))
version_dict->Remove(hash_store_id_, NULL);
version_dict->RemoveWithoutPathExpansion(hash_store_id_, NULL);
// Remove this store's entry in the kHashOfHashesDict.
base::DictionaryValue* hash_of_hashes_dict;
if (update->GetDictionaryWithoutPathExpansion(internals::kHashOfHashesDict,
&hash_of_hashes_dict)) {
hash_of_hashes_dict->Remove(hash_store_id_, NULL);
hash_of_hashes_dict->RemoveWithoutPathExpansion(hash_store_id_, NULL);
}
}
......@@ -121,7 +121,8 @@ PrefHashStoreImpl::StoreVersion PrefHashStoreImpl::GetCurrentVersion() const {
int current_version;
if (!pref_hash_data->GetDictionary(internals::kStoreVersionsDict,
&version_dict) ||
!version_dict->GetInteger(hash_store_id_, &current_version)) {
!version_dict->GetIntegerWithoutPathExpansion(hash_store_id_,
&current_version)) {
return VERSION_PRE_MIGRATION;
}
......@@ -194,7 +195,8 @@ PrefHashStoreImpl::PrefHashStoreTransactionImpl::
store_versions_dict = new base::DictionaryValue;
update->Set(internals::kStoreVersionsDict, store_versions_dict);
}
store_versions_dict->SetInteger(outer_->hash_store_id_, VERSION_LATEST);
store_versions_dict->SetIntegerWithoutPathExpansion(outer_->hash_store_id_,
VERSION_LATEST);
}
PrefHashStoreTransaction::ValueState
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment