Index: components/prefs/pref_value_map.cc |
diff --git a/components/prefs/pref_value_map.cc b/components/prefs/pref_value_map.cc |
index f0392d25284319b4a7b62340065d14c4d483f56d..328688af5c2480b4f507df7c023533bd6f5a7d4d 100644 |
--- a/components/prefs/pref_value_map.cc |
+++ b/components/prefs/pref_value_map.cc |
@@ -157,3 +157,12 @@ void PrefValueMap::GetDifferingKeys( |
for ( ; other_pref != other_prefs.end(); ++other_pref) |
differing_keys->push_back(other_pref->first); |
} |
+ |
+std::unique_ptr<base::DictionaryValue> PrefValueMap::AsDictionaryValue() const { |
+ auto dictionary = base::MakeUnique<base::DictionaryValue>(); |
+ for (const auto& value : prefs_) { |
+ dictionary->SetWithoutPathExpansion(value.first, |
+ value.second->CreateDeepCopy()); |
+ } |
+ return dictionary; |
+} |