| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 void DaemonProcess::CrashNetworkProcess( | 144 void DaemonProcess::CrashNetworkProcess( |
| 145 const tracked_objects::Location& location) { | 145 const tracked_objects::Location& location) { |
| 146 SendToNetwork(new ChromotingDaemonNetworkMsg_Crash( | 146 SendToNetwork(new ChromotingDaemonNetworkMsg_Crash( |
| 147 location.function_name(), location.file_name(), location.line_number())); | 147 location.function_name(), location.file_name(), location.line_number())); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void DaemonProcess::Initialize() { | 150 void DaemonProcess::Initialize() { |
| 151 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 151 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 152 | 152 |
| 153 // Get the name of the host configuration file. | 153 // Get the name of the host configuration file. |
| 154 FilePath default_config_dir = remoting::GetConfigDir(); | 154 base::FilePath default_config_dir = remoting::GetConfigDir(); |
| 155 FilePath config_path = default_config_dir.Append(kDefaultHostConfigFile); | 155 base::FilePath config_path = default_config_dir.Append(kDefaultHostConfigFile)
; |
| 156 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 156 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 157 if (command_line->HasSwitch(kHostConfigSwitchName)) { | 157 if (command_line->HasSwitch(kHostConfigSwitchName)) { |
| 158 config_path = command_line->GetSwitchValuePath(kHostConfigSwitchName); | 158 config_path = command_line->GetSwitchValuePath(kHostConfigSwitchName); |
| 159 } | 159 } |
| 160 | 160 |
| 161 // Start watching the host configuration file. | 161 // Start watching the host configuration file. |
| 162 config_watcher_.reset(new ConfigFileWatcher(caller_task_runner(), | 162 config_watcher_.reset(new ConfigFileWatcher(caller_task_runner(), |
| 163 io_task_runner(), | 163 io_task_runner(), |
| 164 this)); | 164 this)); |
| 165 config_watcher_->Watch(config_path); | 165 config_watcher_->Watch(config_path); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 178 } | 178 } |
| 179 | 179 |
| 180 void DaemonProcess::DeleteAllDesktopSessions() { | 180 void DaemonProcess::DeleteAllDesktopSessions() { |
| 181 while (!desktop_sessions_.empty()) { | 181 while (!desktop_sessions_.empty()) { |
| 182 delete desktop_sessions_.front(); | 182 delete desktop_sessions_.front(); |
| 183 desktop_sessions_.pop_front(); | 183 desktop_sessions_.pop_front(); |
| 184 } | 184 } |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace remoting | 187 } // namespace remoting |
| OLD | NEW |