| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/host/setup/daemon_controller_delegate_linux.h" | 5 #include "remoting/host/setup/daemon_controller_delegate_linux.h" |
| 6 | 6 |
| 7 #include <unistd.h> | 7 #include <unistd.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 result->SetString(kXmppLoginConfigPath, value); | 182 result->SetString(kXmppLoginConfigPath, value); |
| 183 } | 183 } |
| 184 } else { | 184 } else { |
| 185 result.reset(); // Return NULL in case of error. | 185 result.reset(); // Return NULL in case of error. |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 return result.Pass(); | 189 return result.Pass(); |
| 190 } | 190 } |
| 191 | 191 |
| 192 void DaemonControllerDelegateWin::InstallHost( |
| 193 const DaemonController::CompletionCallback& done) { |
| 194 NOTREACHED(); |
| 195 } |
| 196 |
| 192 void DaemonControllerDelegateLinux::SetConfigAndStart( | 197 void DaemonControllerDelegateLinux::SetConfigAndStart( |
| 193 scoped_ptr<base::DictionaryValue> config, | 198 scoped_ptr<base::DictionaryValue> config, |
| 194 bool consent, | 199 bool consent, |
| 195 const DaemonController::CompletionCallback& done) { | 200 const DaemonController::CompletionCallback& done) { |
| 196 // Add the user to chrome-remote-desktop group first. | 201 // Add the user to chrome-remote-desktop group first. |
| 197 std::vector<std::string> args; | 202 std::vector<std::string> args; |
| 198 args.push_back("--add-user"); | 203 args.push_back("--add-user"); |
| 199 int exit_code; | 204 int exit_code; |
| 200 if (!RunHostScriptWithTimeout( | 205 if (!RunHostScriptWithTimeout( |
| 201 args, base::TimeDelta::FromSeconds(kSudoTimeoutSeconds), | 206 args, base::TimeDelta::FromSeconds(kSudoTimeoutSeconds), |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 return consent; | 315 return consent; |
| 311 } | 316 } |
| 312 | 317 |
| 313 scoped_refptr<DaemonController> DaemonController::Create() { | 318 scoped_refptr<DaemonController> DaemonController::Create() { |
| 314 scoped_ptr<DaemonController::Delegate> delegate( | 319 scoped_ptr<DaemonController::Delegate> delegate( |
| 315 new DaemonControllerDelegateLinux()); | 320 new DaemonControllerDelegateLinux()); |
| 316 return new DaemonController(delegate.Pass()); | 321 return new DaemonController(delegate.Pass()); |
| 317 } | 322 } |
| 318 | 323 |
| 319 } // namespace remoting | 324 } // namespace remoting |
| OLD | NEW |