Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: remoting/host/plugin/daemon_controller_mac.cc

Issue 10824286: Fix DaemonControllerLinux::SetConfigAndStart() to reload config automatically. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/plugin/daemon_controller_linux.cc ('k') | remoting/tools/me2me_virtual_host.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..54c59b385d867be67a1fcd9b7339eb2573effa23 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();
« no previous file with comments | « remoting/host/plugin/daemon_controller_linux.cc ('k') | remoting/tools/me2me_virtual_host.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698