| Index: components/prefs/overlay_user_pref_store.cc
|
| diff --git a/components/prefs/overlay_user_pref_store.cc b/components/prefs/overlay_user_pref_store.cc
|
| index 2b2208ed8214408290c312125e5309689dfecaff..ddc47c8f351d58320c3dc836c3208271a38b510e 100644
|
| --- a/components/prefs/overlay_user_pref_store.cc
|
| +++ b/components/prefs/overlay_user_pref_store.cc
|
| @@ -47,6 +47,24 @@ bool OverlayUserPrefStore::GetValue(const std::string& key,
|
| return underlay_->GetValue(GetUnderlayKey(key), result);
|
| }
|
|
|
| +std::unique_ptr<base::DictionaryValue> OverlayUserPrefStore::GetValues() const {
|
| + auto values = underlay_->GetValues();
|
| + auto overlay_values = overlay_.AsDictionaryValue();
|
| + for (const auto& overlay_mapping : overlay_to_underlay_names_map_) {
|
| + const std::string& overlay_key = overlay_mapping.first;
|
| + const std::string& underlay_key = overlay_mapping.second;
|
| + std::unique_ptr<base::Value> out_value;
|
| + if (overlay_key != underlay_key) {
|
| + values->Remove(underlay_key, &out_value);
|
| + }
|
| + overlay_values->Remove(overlay_key, &out_value);
|
| + if (out_value) {
|
| + values->Set(overlay_key, std::move(out_value));
|
| + }
|
| + }
|
| + return values;
|
| +}
|
| +
|
| bool OverlayUserPrefStore::GetMutableValue(const std::string& key,
|
| base::Value** result) {
|
| if (!ShallBeStoredInOverlay(key))
|
|
|