| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 status_observers_.AddObserver(observer); | 74 status_observers_.AddObserver(observer); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void DaemonProcess::RemoveStatusObserver(HostStatusObserver* observer) { | 77 void DaemonProcess::RemoveStatusObserver(HostStatusObserver* observer) { |
| 78 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 78 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 79 | 79 |
| 80 status_observers_.RemoveObserver(observer); | 80 status_observers_.RemoveObserver(observer); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void DaemonProcess::OnChannelConnected(int32 peer_pid) { | 83 void DaemonProcess::OnChannelConnected(int32_t peer_pid) { |
| 84 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 84 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 85 | 85 |
| 86 VLOG(1) << "IPC: daemon <- network (" << peer_pid << ")"; | 86 VLOG(1) << "IPC: daemon <- network (" << peer_pid << ")"; |
| 87 | 87 |
| 88 DeleteAllDesktopSessions(); | 88 DeleteAllDesktopSessions(); |
| 89 | 89 |
| 90 // Reset the last known terminal ID because no IDs have been allocated | 90 // Reset the last known terminal ID because no IDs have been allocated |
| 91 // by the the newly started process yet. | 91 // by the the newly started process yet. |
| 92 next_terminal_id_ = 0; | 92 next_terminal_id_ = 0; |
| 93 | 93 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 } | 373 } |
| 374 | 374 |
| 375 void DaemonProcess::DeleteAllDesktopSessions() { | 375 void DaemonProcess::DeleteAllDesktopSessions() { |
| 376 while (!desktop_sessions_.empty()) { | 376 while (!desktop_sessions_.empty()) { |
| 377 delete desktop_sessions_.front(); | 377 delete desktop_sessions_.front(); |
| 378 desktop_sessions_.pop_front(); | 378 desktop_sessions_.pop_front(); |
| 379 } | 379 } |
| 380 } | 380 } |
| 381 | 381 |
| 382 } // namespace remoting | 382 } // namespace remoting |
| OLD | NEW |