| Index: content/shell/browser/shell_devtools_frontend.cc
|
| diff --git a/content/shell/browser/shell_devtools_frontend.cc b/content/shell/browser/shell_devtools_frontend.cc
|
| index d4ffd09b7f7866ed29409315485d797dde6cbb10..9b597db955a4c32bf9315e007a63d3e7645f3685 100644
|
| --- a/content/shell/browser/shell_devtools_frontend.cc
|
| +++ b/content/shell/browser/shell_devtools_frontend.cc
|
| @@ -193,6 +193,21 @@ void ShellDevToolsFrontend::WebContentsDestroyed() {
|
| delete this;
|
| }
|
|
|
| +void ShellDevToolsFrontend::SetPreferences(const std::string& json) {
|
| + preferences_.Clear();
|
| + if (json.empty())
|
| + return;
|
| + base::DictionaryValue* dict = nullptr;
|
| + std::unique_ptr<base::Value> parsed = base::JSONReader::Read(json);
|
| + if (!parsed || !parsed->GetAsDictionary(&dict))
|
| + return;
|
| + for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
|
| + if (!it.value().IsType(base::Value::TYPE_STRING))
|
| + continue;
|
| + preferences_.SetWithoutPathExpansion(it.key(), it.value().CreateDeepCopy());
|
| + }
|
| +}
|
| +
|
| void ShellDevToolsFrontend::HandleMessageFromDevToolsFrontend(
|
| const std::string& message) {
|
| if (!agent_host_)
|
|
|