refactor: remove instances of createDeepCopy (#13703)
* add new native_mate converters for base::Value * fix converter swapping * remove createDeepCopy from browser/api * replace missing ListValue converter * convert bulk of remaining createDeepCopy instances * convert last remaining instances of createDeepCopy * incremental progress and helper methods for value conversion * convert Get and add template function for GetString * final DictionaryValue method conversions * remove usage of base::DictionaryValue in web_contents_preferences * use IsEnabled helper where possible * Update atom_api_web_view_manager.cc
This commit is contained in:
parent
cecb8fb0c4
commit
9f328abe19
14 changed files with 208 additions and 113 deletions
|
@ -26,7 +26,9 @@ bool PreferencesManager::OnControlMessageReceived(const IPC::Message& message) {
|
|||
|
||||
void PreferencesManager::OnUpdatePreferences(
|
||||
const base::ListValue& preferences) {
|
||||
preferences_ = preferences.CreateDeepCopy();
|
||||
auto copy =
|
||||
base::ListValue::From(base::Value::ToUniquePtrValue(preferences.Clone()));
|
||||
preferences_.swap(copy);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue