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

Unified Diff: remoting/host/in_memory_host_config.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/in_memory_host_config.h ('k') | remoting/host/plugin/daemon_controller_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « remoting/host/in_memory_host_config.h ('k') | remoting/host/plugin/daemon_controller_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698