Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: remoting/host/desktop_process.cc

Issue 11348087: Add AutoThread types for Windows that initialize COM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 desktop_agent_.reset(); 63 desktop_agent_.reset();
64 caller_task_runner_ = NULL; 64 caller_task_runner_ = NULL;
65 } 65 }
66 66
67 bool DesktopProcess::Start() { 67 bool DesktopProcess::Start() {
68 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 68 DCHECK(caller_task_runner_->BelongsToCurrentThread());
69 69
70 // Launch the I/O thread. 70 // Launch the I/O thread.
71 scoped_refptr<AutoThreadTaskRunner> io_task_runner = 71 scoped_refptr<AutoThreadTaskRunner> io_task_runner =
72 AutoThread::CreateWithType(kIoThreadName, caller_task_runner_, 72 AutoThread::CreateWithType(kIoThreadName, caller_task_runner_,
73 MessageLoop::TYPE_IO); 73 AutoThread::TYPE_IO);
74 74
75 // Create a desktop agent. 75 // Create a desktop agent.
76 desktop_agent_ = DesktopSessionAgent::Create(caller_task_runner_, 76 desktop_agent_ = DesktopSessionAgent::Create(caller_task_runner_,
77 io_task_runner); 77 io_task_runner);
78 78
79 // Start the agent and create an IPC channel to talk to it. It is safe to 79 // Start the agent and create an IPC channel to talk to it. It is safe to
80 // use base::Unretained(this) here because the message loop below will run 80 // use base::Unretained(this) here because the message loop below will run
81 // until |desktop_agent_| is completely destroyed. 81 // until |desktop_agent_| is completely destroyed.
82 IPC::PlatformFileForTransit desktop_pipe; 82 IPC::PlatformFileForTransit desktop_pipe;
83 if (!desktop_agent_->Start(base::Bind(&DesktopProcess::OnChannelError, 83 if (!desktop_agent_->Start(base::Bind(&DesktopProcess::OnChannelError,
(...skipping 17 matching lines...) Expand all
101 } 101 }
102 102
103 void DesktopProcess::OnCrash(const std::string& function_name, 103 void DesktopProcess::OnCrash(const std::string& function_name,
104 const std::string& file_name, 104 const std::string& file_name,
105 const int& line_number) { 105 const int& line_number) {
106 // The daemon requested us to crash the process. 106 // The daemon requested us to crash the process.
107 CHECK(false); 107 CHECK(false);
108 } 108 }
109 109
110 } // namespace remoting 110 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698