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

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

Issue 12096071: Adding a unit test to verify the IPC channel between the network and desktop processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix posix #2 Created 7 years, 10 months 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
« no previous file with comments | « remoting/host/daemon_process_win.cc ('k') | remoting/host/desktop_session_agent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_main.h" 8 #include "remoting/host/desktop_process_main.h"
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 std::string channel_name = 116 std::string channel_name =
117 command_line->GetSwitchValueASCII(kDaemonIpcSwitchName); 117 command_line->GetSwitchValueASCII(kDaemonIpcSwitchName);
118 118
119 if (channel_name.empty()) { 119 if (channel_name.empty()) {
120 Usage(command_line->GetProgram()); 120 Usage(command_line->GetProgram());
121 return kUsageExitCode; 121 return kUsageExitCode;
122 } 122 }
123 123
124 MessageLoop message_loop(MessageLoop::TYPE_UI); 124 MessageLoop message_loop(MessageLoop::TYPE_UI);
125 base::RunLoop run_loop; 125 base::RunLoop run_loop;
126 base::Closure quit_ui_task_runner = base::Bind(
127 base::IgnoreResult(&base::SingleThreadTaskRunner::PostTask),
128 message_loop.message_loop_proxy(),
129 FROM_HERE, run_loop.QuitClosure());
130 scoped_refptr<AutoThreadTaskRunner> ui_task_runner = 126 scoped_refptr<AutoThreadTaskRunner> ui_task_runner =
131 new AutoThreadTaskRunner(message_loop.message_loop_proxy(), 127 new AutoThreadTaskRunner(message_loop.message_loop_proxy(),
132 quit_ui_task_runner); 128 run_loop.QuitClosure());
133 129
134 DesktopProcess desktop_process(ui_task_runner, channel_name); 130 DesktopProcess desktop_process(ui_task_runner, channel_name);
135 131
136 // Create a platform-dependent environment factory. 132 // Create a platform-dependent environment factory.
137 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory; 133 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory;
138 #if defined(OS_WIN) 134 #if defined(OS_WIN)
139 desktop_environment_factory.reset( 135 desktop_environment_factory.reset(
140 new SessionDesktopEnvironmentFactory( 136 new SessionDesktopEnvironmentFactory(
141 base::Bind(&DesktopProcess::InjectSas, 137 base::Bind(&DesktopProcess::InjectSas,
142 desktop_process.AsWeakPtr()))); 138 desktop_process.AsWeakPtr())));
(...skipping 12 matching lines...) Expand all
155 return kSuccessExitCode; 151 return kSuccessExitCode;
156 } 152 }
157 153
158 } // namespace remoting 154 } // namespace remoting
159 155
160 #if !defined(OS_WIN) 156 #if !defined(OS_WIN)
161 int main(int argc, char** argv) { 157 int main(int argc, char** argv) {
162 return remoting::DesktopProcessMain(argc, argv); 158 return remoting::DesktopProcessMain(argc, argv);
163 } 159 }
164 #endif // !defined(OS_WIN) 160 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « remoting/host/daemon_process_win.cc ('k') | remoting/host/desktop_session_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698