| 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 // This file implements the Windows service controlling Me2Me host processes | 5 // This file implements the Windows service controlling Me2Me host processes | 
| 6 // running within user sessions. | 6 // running within user sessions. | 
| 7 | 7 | 
| 8 #include "remoting/host/desktop_process.h" | 8 #include "remoting/host/desktop_process.h" | 
| 9 | 9 | 
| 10 #include "base/bind.h" | 10 #include "base/bind.h" | 
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" | 
| 12 #include "base/debug/alias.h" | 12 #include "base/debug/alias.h" | 
| 13 #include "base/logging.h" | 13 #include "base/logging.h" | 
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" | 
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" | 
| 16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" | 
|  | 17 #include "build/build_config.h" | 
| 17 #include "ipc/ipc_channel_proxy.h" | 18 #include "ipc/ipc_channel_proxy.h" | 
| 18 #include "remoting/base/auto_thread.h" | 19 #include "remoting/base/auto_thread.h" | 
| 19 #include "remoting/base/auto_thread_task_runner.h" | 20 #include "remoting/base/auto_thread_task_runner.h" | 
| 20 #include "remoting/host/chromoting_messages.h" | 21 #include "remoting/host/chromoting_messages.h" | 
| 21 #include "remoting/host/desktop_environment.h" | 22 #include "remoting/host/desktop_environment.h" | 
| 22 #include "remoting/host/desktop_session_agent.h" | 23 #include "remoting/host/desktop_session_agent.h" | 
| 23 | 24 | 
| 24 namespace remoting { | 25 namespace remoting { | 
| 25 | 26 | 
| 26 DesktopProcess::DesktopProcess( | 27 DesktopProcess::DesktopProcess( | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 63   bool handled = true; | 64   bool handled = true; | 
| 64   IPC_BEGIN_MESSAGE_MAP(DesktopProcess, message) | 65   IPC_BEGIN_MESSAGE_MAP(DesktopProcess, message) | 
| 65     IPC_MESSAGE_HANDLER(ChromotingDaemonMsg_Crash, OnCrash) | 66     IPC_MESSAGE_HANDLER(ChromotingDaemonMsg_Crash, OnCrash) | 
| 66     IPC_MESSAGE_UNHANDLED(handled = false) | 67     IPC_MESSAGE_UNHANDLED(handled = false) | 
| 67   IPC_END_MESSAGE_MAP() | 68   IPC_END_MESSAGE_MAP() | 
| 68 | 69 | 
| 69   CHECK(handled) << "Received unexpected IPC type: " << message.type(); | 70   CHECK(handled) << "Received unexpected IPC type: " << message.type(); | 
| 70   return handled; | 71   return handled; | 
| 71 } | 72 } | 
| 72 | 73 | 
| 73 void DesktopProcess::OnChannelConnected(int32 peer_pid) { | 74 void DesktopProcess::OnChannelConnected(int32_t peer_pid) { | 
| 74   DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 75   DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 
| 75 | 76 | 
| 76   VLOG(1) << "IPC: desktop <- daemon (" << peer_pid << ")"; | 77   VLOG(1) << "IPC: desktop <- daemon (" << peer_pid << ")"; | 
| 77 } | 78 } | 
| 78 | 79 | 
| 79 void DesktopProcess::OnChannelError() { | 80 void DesktopProcess::OnChannelError() { | 
| 80   // Shutdown the desktop process. | 81   // Shutdown the desktop process. | 
| 81   daemon_channel_.reset(); | 82   daemon_channel_.reset(); | 
| 82   if (desktop_agent_.get()) { | 83   if (desktop_agent_.get()) { | 
| 83     desktop_agent_->Stop(); | 84     desktop_agent_->Stop(); | 
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 157   base::snprintf(message, sizeof(message), | 158   base::snprintf(message, sizeof(message), | 
| 158                  "Requested by %s at %s, line %d.", | 159                  "Requested by %s at %s, line %d.", | 
| 159                  function_name.c_str(), file_name.c_str(), line_number); | 160                  function_name.c_str(), file_name.c_str(), line_number); | 
| 160   base::debug::Alias(message); | 161   base::debug::Alias(message); | 
| 161 | 162 | 
| 162   // The daemon requested us to crash the process. | 163   // The daemon requested us to crash the process. | 
| 163   CHECK(false) << message; | 164   CHECK(false) << message; | 
| 164 } | 165 } | 
| 165 | 166 | 
| 166 } // namespace remoting | 167 } // namespace remoting | 
| OLD | NEW | 
|---|