| 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 5c2b9f9d0b5794b1641ea02898ab1646a76d78bb..be9d66bfe68bbed2a656654d3a373d2357e8a16b 100644
|
| --- a/remoting/host/plugin/daemon_controller_mac.cc
|
| +++ b/remoting/host/plugin/daemon_controller_mac.cc
|
| @@ -136,19 +136,18 @@ void DaemonControllerMac::Stop(const CompletionCallback& done_callback) {
|
| }
|
|
|
| void DaemonControllerMac::DoGetConfig(const GetConfigCallback& callback) {
|
| - JsonHostConfig host_config(FilePath(kHostConfigFile),
|
| - base::MessageLoopProxy::current());
|
| - host_config.Read();
|
| -
|
| - scoped_ptr<base::DictionaryValue> config(new base::DictionaryValue());
|
| -
|
| - const char* key = "host_id";
|
| - std::string value;
|
| - if (host_config.GetString(key, &value))
|
| - config.get()->SetString(key, value);
|
| - key = "xmpp_login";
|
| - if (host_config.GetString(key, &value))
|
| - config.get()->SetString(key, value);
|
| + FilePath config_path(kHostConfigFile);
|
| + JsonHostConfig host_config(config_path);
|
| + scoped_ptr<base::DictionaryValue> config;
|
| +
|
| + if (host_config.Read()) {
|
| + config.reset(new base::DictionaryValue());
|
| + std::string value;
|
| + if (host_config.GetString(kHostIdConfigPath, &value))
|
| + config.get()->SetString(kHostIdConfigPath, value);
|
| + if (host_config.GetString(kXmppLoginConfigPath, &value))
|
| + config.get()->SetString(kXmppLoginConfigPath, value);
|
| + }
|
|
|
| callback.Run(config.Pass());
|
| }
|
|
|