| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 void DaemonProcess::OnConfigWatcherError() { | 34 void DaemonProcess::OnConfigWatcherError() { |
| 35 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 35 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 36 | 36 |
| 37 Stop(); | 37 Stop(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void DaemonProcess::OnChannelConnected(int32 peer_pid) { | 40 void DaemonProcess::OnChannelConnected(int32 peer_pid) { |
| 41 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 41 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 42 | 42 |
| 43 VLOG(1) << "IPC: daemon <- network (" << peer_pid << ")"; |
| 44 |
| 43 DeleteAllDesktopSessions(); | 45 DeleteAllDesktopSessions(); |
| 44 | 46 |
| 45 // Reset the last known terminal ID because no IDs have been allocated | 47 // Reset the last known terminal ID because no IDs have been allocated |
| 46 // by the the newly started process yet. | 48 // by the the newly started process yet. |
| 47 next_terminal_id_ = 0; | 49 next_terminal_id_ = 0; |
| 48 | 50 |
| 49 // Send the configuration to the network process. | 51 // Send the configuration to the network process. |
| 50 SendToNetwork( | 52 SendToNetwork( |
| 51 new ChromotingDaemonNetworkMsg_Configuration(serialized_config_)); | 53 new ChromotingDaemonNetworkMsg_Configuration(serialized_config_)); |
| 52 } | 54 } |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 177 } |
| 176 | 178 |
| 177 void DaemonProcess::DeleteAllDesktopSessions() { | 179 void DaemonProcess::DeleteAllDesktopSessions() { |
| 178 while (!desktop_sessions_.empty()) { | 180 while (!desktop_sessions_.empty()) { |
| 179 delete desktop_sessions_.front(); | 181 delete desktop_sessions_.front(); |
| 180 desktop_sessions_.pop_front(); | 182 desktop_sessions_.pop_front(); |
| 181 } | 183 } |
| 182 } | 184 } |
| 183 | 185 |
| 184 } // namespace remoting | 186 } // namespace remoting |
| OLD | NEW |