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

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

Issue 11419265: Revert 170360 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 1080 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
1081 gfx::GtkInitFromCommandLine(*cmd_line); 1081 gfx::GtkInitFromCommandLine(*cmd_line);
1082 #endif // TOOLKIT_GTK 1082 #endif // TOOLKIT_GTK
1083 1083
1084 // Enable support for SSL server sockets, which must be done while still 1084 // Enable support for SSL server sockets, which must be done while still
1085 // single-threaded. 1085 // single-threaded.
1086 net::EnableSSLServerSockets(); 1086 net::EnableSSLServerSockets();
1087 1087
1088 // Create the main message loop and start helper threads. 1088 // Create the main message loop and start helper threads.
1089 MessageLoop message_loop(MessageLoop::TYPE_UI); 1089 MessageLoop message_loop(MessageLoop::TYPE_UI);
1090 scoped_ptr<remoting::ChromotingHostContext> context = 1090 base::Closure quit_message_loop = base::Bind(&QuitMessageLoop, &message_loop);
1091 remoting::ChromotingHostContext::Create( 1091 scoped_ptr<remoting::ChromotingHostContext> context(
1092 new remoting::ChromotingHostContext(
1092 new remoting::AutoThreadTaskRunner(message_loop.message_loop_proxy(), 1093 new remoting::AutoThreadTaskRunner(message_loop.message_loop_proxy(),
1093 MessageLoop::QuitClosure())); 1094 quit_message_loop)));
1094 if (context) 1095
1096 if (!context->Start())
1095 return remoting::kInitializationFailed; 1097 return remoting::kInitializationFailed;
1096 1098
1097 // Create & start the HostProcess using these threads. 1099 // Create & start the HostProcess using these threads.
1098 // TODO(wez): The HostProcess holds a reference to itself until Shutdown(). 1100 // TODO(wez): The HostProcess holds a reference to itself until Shutdown().
1099 // Remove this hack as part of the multi-process refactoring. 1101 // Remove this hack as part of the multi-process refactoring.
1100 int exit_code = remoting::kSuccessExitCode; 1102 int exit_code = remoting::kSuccessExitCode;
1101 new remoting::HostProcess(context.Pass(), &exit_code); 1103 new remoting::HostProcess(context.Pass(), &exit_code);
1102 1104
1103 // Run the main (also UI) message loop until the host no longer needs it. 1105 // Run the main (also UI) message loop until the host no longer needs it.
1104 message_loop.Run(); 1106 message_loop.Run();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 user32.GetFunctionPointer("SetProcessDPIAware")); 1142 user32.GetFunctionPointer("SetProcessDPIAware"));
1141 set_process_dpi_aware(); 1143 set_process_dpi_aware();
1142 } 1144 }
1143 1145
1144 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting 1146 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting
1145 // the command line from GetCommandLineW(), so we can safely pass NULL here. 1147 // the command line from GetCommandLineW(), so we can safely pass NULL here.
1146 return main(0, NULL); 1148 return main(0, NULL);
1147 } 1149 }
1148 1150
1149 #endif // defined(OS_WIN) 1151 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « remoting/host/plugin/host_script_object.cc ('k') | remoting/host/win/session_desktop_environment_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698