Index: remoting/host/in_memory_host_config.cc |
diff --git a/remoting/host/in_memory_host_config.cc b/remoting/host/in_memory_host_config.cc |
index 5e95127b27bd0c7be8afe500d20df6150425161b..b2f2991b124332007c228a053d7d48843331f63e 100644 |
--- a/remoting/host/in_memory_host_config.cc |
+++ b/remoting/host/in_memory_host_config.cc |
@@ -44,4 +44,23 @@ void InMemoryHostConfig::SetBoolean(const std::string& path, bool in_value) { |
values_->SetBoolean(path, in_value); |
} |
+bool InMemoryHostConfig::CopyFrom(const base::DictionaryValue* dictionary) { |
+ bool result = true; |
+ |
+ for (DictionaryValue::key_iterator key(dictionary->begin_keys()); |
+ key != dictionary->end_keys(); ++key) { |
+ std::string str_value; |
+ bool bool_value; |
+ if (dictionary->GetString(*key, &str_value)) { |
+ SetString(*key, str_value); |
+ } else if (dictionary->GetBoolean(*key, &bool_value)) { |
+ SetBoolean(*key, bool_value); |
+ } else { |
+ result = false; |
+ } |
+ } |
+ |
+ return result; |
+} |
+ |
} // namespace remoting |