Chromium Code Reviews| 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)) { |
|
Jamie
2012/08/13 23:44:31
The code this is based on didn't handle Boolean va
Sergey Ulanov
2012/08/14 18:00:37
We use boolean only for oauth_use_official_client_
|
| + SetBoolean(*key, bool_value); |
| + } else { |
| + result = false; |
| + } |
| + } |
| + |
| + return result; |
| +} |
| + |
| } // namespace remoting |