Chromium Code Reviews| Index: remoting/host/plugin/daemon_controller_linux.cc |
| diff --git a/remoting/host/plugin/daemon_controller_linux.cc b/remoting/host/plugin/daemon_controller_linux.cc |
| index 5083785347e150e5f1da694afe4630a319c34507..b975e127240084e82809d95381a4e30fcb26413e 100644 |
| --- a/remoting/host/plugin/daemon_controller_linux.cc |
| +++ b/remoting/host/plugin/daemon_controller_linux.cc |
| @@ -192,17 +192,21 @@ FilePath DaemonControllerLinux::GetConfigPath() { |
| } |
| void DaemonControllerLinux::DoGetConfig(const GetConfigCallback& callback) { |
| - JsonHostConfig config(GetConfigPath()); |
| - scoped_ptr<base::DictionaryValue> result; |
| - if (config.Read()) { |
| - result.reset(new base::DictionaryValue()); |
| - |
| - std::string value; |
| - if (config.GetString(kHostIdConfigPath, &value)) |
| - result->SetString(kHostIdConfigPath, value); |
| - if (config.GetString(kXmppLoginConfigPath, &value)) |
| - result->SetString(kXmppLoginConfigPath, value); |
| + scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue()); |
| + |
| + if (GetState() != remoting::DaemonController::STATE_NOT_IMPLEMENTED) { |
| + JsonHostConfig config(GetConfigPath()); |
| + if (config.Read()) { |
| + std::string value; |
| + if (config.GetString(kHostIdConfigPath, &value)) |
| + result->SetString(kHostIdConfigPath, value); |
|
Sergey Ulanov
2012/04/27 01:29:22
nit: add {} to match style of other ifs in this fi
Wez
2012/04/28 05:16:37
Done.
|
| + if (config.GetString(kXmppLoginConfigPath, &value)) |
| + result->SetString(kXmppLoginConfigPath, value); |
| + } else { |
| + result.reset(); // Return NULL in case of error. |
| + } |
| } |
| + |
| callback.Run(result.Pass()); |
| } |