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..ecacf4c73d4b550f61c292d2047646b6776b0493 100644 |
--- a/components/prefs/pref_value_map.cc |
+++ b/components/prefs/pref_value_map.cc |
@@ -157,3 +157,11 @@ 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->Set(value.first, value.second->CreateDeepCopy()); |
+ } |
+ return dictionary; |
+} |