| 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 982337a0155b50e36249f6ac5f9bd3e7c6a8be63..b589669f23ae797e0f67066a681ceabca1ea5dd5 100644
|
| --- a/content/shell/browser/shell_devtools_frontend.cc
|
| +++ b/content/shell/browser/shell_devtools_frontend.cc
|
| @@ -181,6 +181,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_)
|
|
|