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

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

Issue 1735523003: Improve handling of invalid command line in Me2Me host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@win_threads
Patch Set: Created 4 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
« no previous file with comments | « no previous file | remoting/host/host_exit_codes.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 <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 14 matching lines...) Expand all
25 25
26 namespace remoting { 26 namespace remoting {
27 27
28 int DesktopProcessMain() { 28 int DesktopProcessMain() {
29 const base::CommandLine* command_line = 29 const base::CommandLine* command_line =
30 base::CommandLine::ForCurrentProcess(); 30 base::CommandLine::ForCurrentProcess();
31 std::string channel_name = 31 std::string channel_name =
32 command_line->GetSwitchValueASCII(kDaemonPipeSwitchName); 32 command_line->GetSwitchValueASCII(kDaemonPipeSwitchName);
33 33
34 if (channel_name.empty()) 34 if (channel_name.empty())
35 return kUsageExitCode; 35 return kInvalidCommandLineExitCode;
36 36
37 base::MessageLoopForUI message_loop; 37 base::MessageLoopForUI message_loop;
38 base::RunLoop run_loop; 38 base::RunLoop run_loop;
39 scoped_refptr<AutoThreadTaskRunner> ui_task_runner = 39 scoped_refptr<AutoThreadTaskRunner> ui_task_runner =
40 new AutoThreadTaskRunner(message_loop.task_runner(), 40 new AutoThreadTaskRunner(message_loop.task_runner(),
41 run_loop.QuitClosure()); 41 run_loop.QuitClosure());
42 42
43 // Launch the video capture thread. 43 // Launch the video capture thread.
44 scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner = 44 scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner =
45 AutoThread::Create("Video capture thread", ui_task_runner); 45 AutoThread::Create("Video capture thread", ui_task_runner);
(...skipping 30 matching lines...) Expand all
76 return kSuccessExitCode; 76 return kSuccessExitCode;
77 } 77 }
78 78
79 } // namespace remoting 79 } // namespace remoting
80 80
81 #if !defined(OS_WIN) 81 #if !defined(OS_WIN)
82 int main(int argc, char** argv) { 82 int main(int argc, char** argv) {
83 return remoting::HostMain(argc, argv); 83 return remoting::HostMain(argc, argv);
84 } 84 }
85 #endif // !defined(OS_WIN) 85 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « no previous file | remoting/host/host_exit_codes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698