Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3882)

Unified Diff: chrome/browser/prefs/pref_hash_store_impl.cc

Issue 187443007: All Get/Set using the hash_store_id as a key should use *WithoutPathExpansion methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_hash_store_impl.cc
diff --git a/chrome/browser/prefs/pref_hash_store_impl.cc b/chrome/browser/prefs/pref_hash_store_impl.cc
index 1d8f475f7aae31d63ccc82063c2b1c47eabf5762..5e41cb4d8494aed88d1c288c737b8cecbd667cd3 100644
--- a/chrome/browser/prefs/pref_hash_store_impl.cc
+++ b/chrome/browser/prefs/pref_hash_store_impl.cc
@@ -90,13 +90,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);
}
}
@@ -116,7 +116,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;
}
@@ -189,7 +190,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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698