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

Side by Side Diff: remoting/host/setup/native_messaging_host_main.cc

Issue 14979008: unittests for Chromoting native messaging host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename pipe.h->test_util.h, and fix Windows test failure Created 7 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/setup/native_messaging_host.h" 5 #include "remoting/host/setup/native_messaging_host.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 15 matching lines...) Expand all
26 base::PlatformFile write_file = GetStdHandle(STD_OUTPUT_HANDLE); 26 base::PlatformFile write_file = GetStdHandle(STD_OUTPUT_HANDLE);
27 #elif defined(OS_POSIX) 27 #elif defined(OS_POSIX)
28 base::PlatformFile read_file = STDIN_FILENO; 28 base::PlatformFile read_file = STDIN_FILENO;
29 base::PlatformFile write_file = STDOUT_FILENO; 29 base::PlatformFile write_file = STDOUT_FILENO;
30 #else 30 #else
31 #error Not implemented. 31 #error Not implemented.
32 #endif 32 #endif
33 33
34 base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); 34 base::MessageLoop message_loop(base::MessageLoop::TYPE_IO);
35 base::RunLoop run_loop; 35 base::RunLoop run_loop;
36 remoting::NativeMessagingHost host(read_file, write_file, 36 remoting::NativeMessagingHost host(remoting::DaemonController::Create(),
37 read_file, write_file,
37 message_loop.message_loop_proxy(), 38 message_loop.message_loop_proxy(),
38 run_loop.QuitClosure()); 39 run_loop.QuitClosure());
39 host.Start(); 40 host.Start();
40 run_loop.Run(); 41 run_loop.Run();
41 return 0; 42 return 0;
42 } 43 }
OLDNEW
« no previous file with comments | « remoting/host/setup/native_messaging_host.cc ('k') | remoting/host/setup/native_messaging_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698