| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/daemon_process.h" | 5 #include "remoting/host/daemon_process.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 const tracked_objects::Location& location) { | 252 const tracked_objects::Location& location) { |
| 253 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 253 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 254 | 254 |
| 255 DoCrashNetworkProcess(location); | 255 DoCrashNetworkProcess(location); |
| 256 DeleteAllDesktopSessions(); | 256 DeleteAllDesktopSessions(); |
| 257 } | 257 } |
| 258 | 258 |
| 259 void DaemonProcess::Initialize() { | 259 void DaemonProcess::Initialize() { |
| 260 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 260 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 261 | 261 |
| 262 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 262 const base::CommandLine* command_line = |
| 263 base::CommandLine::ForCurrentProcess(); |
| 263 // Get the name of the host configuration file. | 264 // Get the name of the host configuration file. |
| 264 base::FilePath default_config_dir = remoting::GetConfigDir(); | 265 base::FilePath default_config_dir = remoting::GetConfigDir(); |
| 265 base::FilePath config_path = default_config_dir.Append( | 266 base::FilePath config_path = default_config_dir.Append( |
| 266 kDefaultHostConfigFile); | 267 kDefaultHostConfigFile); |
| 267 if (command_line->HasSwitch(kHostConfigSwitchName)) { | 268 if (command_line->HasSwitch(kHostConfigSwitchName)) { |
| 268 config_path = command_line->GetSwitchValuePath(kHostConfigSwitchName); | 269 config_path = command_line->GetSwitchValuePath(kHostConfigSwitchName); |
| 269 } | 270 } |
| 270 config_watcher_.reset(new ConfigFileWatcher( | 271 config_watcher_.reset(new ConfigFileWatcher( |
| 271 caller_task_runner(), io_task_runner(), config_path)); | 272 caller_task_runner(), io_task_runner(), config_path)); |
| 272 config_watcher_->Watch(this); | 273 config_watcher_->Watch(this); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 371 } |
| 371 | 372 |
| 372 void DaemonProcess::DeleteAllDesktopSessions() { | 373 void DaemonProcess::DeleteAllDesktopSessions() { |
| 373 while (!desktop_sessions_.empty()) { | 374 while (!desktop_sessions_.empty()) { |
| 374 delete desktop_sessions_.front(); | 375 delete desktop_sessions_.front(); |
| 375 desktop_sessions_.pop_front(); | 376 desktop_sessions_.pop_front(); |
| 376 } | 377 } |
| 377 } | 378 } |
| 378 | 379 |
| 379 } // namespace remoting | 380 } // namespace remoting |
| OLD | NEW |