Index: remoting/host/plugin/daemon_controller_mac.cc |
diff --git a/remoting/host/plugin/daemon_controller_mac.cc b/remoting/host/plugin/daemon_controller_mac.cc |
index 66505c833e9b0196f9deacb4784ee64626929c92..211cd6402f7d6cd4c65098d290aaee07e924bff8 100644 |
--- a/remoting/host/plugin/daemon_controller_mac.cc |
+++ b/remoting/host/plugin/daemon_controller_mac.cc |
@@ -228,15 +228,10 @@ void DaemonControllerMac::DoUpdateConfig( |
done_callback.Run(RESULT_FAILED); |
return; |
} |
- for (DictionaryValue::key_iterator key(config->begin_keys()); |
- key != config->end_keys(); ++key) { |
- std::string value; |
- if (!config->GetString(*key, &value)) { |
- LOG(ERROR) << *key << " is not a string."; |
- done_callback.Run(RESULT_FAILED); |
- return; |
- } |
- config_file.SetString(*key, value); |
+ if (!config_file.CopyFrom(config.Get())) { |
+ LOG(ERROR) << "Failed to update configuration."; |
+ done_callback.Run(RESULT_FAILED); |
+ return; |
} |
std::string config_data = config_file.GetSerializedData(); |