OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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, which is currently | 5 // This file implements a standalone host process for Me2Me, which is currently |
6 // used for the Linux-only Virtual Me2Me build. | 6 // used for the Linux-only Virtual Me2Me build. |
7 | 7 |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 new remoting::HeartbeatSender(context.network_message_loop(), | 98 new remoting::HeartbeatSender(context.network_message_loop(), |
99 host_config_)); | 99 host_config_)); |
100 if (!heartbeat_sender->Init()) { | 100 if (!heartbeat_sender->Init()) { |
101 context.Stop(); | 101 context.Stop(); |
102 return 1; | 102 return 1; |
103 } | 103 } |
104 host_->AddStatusObserver(heartbeat_sender.get()); | 104 host_->AddStatusObserver(heartbeat_sender.get()); |
105 | 105 |
106 // Run the ChromotingHost until the shutdown task is executed. | 106 // Run the ChromotingHost until the shutdown task is executed. |
107 host_->Start(); | 107 host_->Start(); |
108 | |
109 // Set an empty shared-secret for Me2Me. | |
110 // TODO(lambroslambrou): This is a temporary fix, pending a Me2Me-specific | |
111 // AuthenticatorFactory. | |
Sergey Ulanov
2011/12/01 01:34:01
please reference crbug.com/105214 here.
| |
112 context.network_message_loop()->PostTask( | |
113 FROM_HERE, base::Bind(&ChromotingHost::SetSharedSecret, host_.get(), | |
114 std::string())); | |
Sergey Ulanov
2011/12/01 01:34:01
"" - is more readable.
| |
115 | |
108 message_loop.MessageLoop::Run(); | 116 message_loop.MessageLoop::Run(); |
109 | 117 |
110 // And then stop the chromoting context. | 118 // And then stop the chromoting context. |
111 context.Stop(); | 119 context.Stop(); |
112 file_io_thread.Stop(); | 120 file_io_thread.Stop(); |
113 | 121 |
114 host_ = NULL; | 122 host_ = NULL; |
115 | 123 |
116 return 0; | 124 return 0; |
117 } | 125 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 // Continue windows, though these should not be used for the Me2Me case | 183 // Continue windows, though these should not be used for the Me2Me case |
176 // (crbug.com/104377). | 184 // (crbug.com/104377). |
177 gfx::GtkInitFromCommandLine(*cmd_line); | 185 gfx::GtkInitFromCommandLine(*cmd_line); |
178 #endif // TOOLKIT_USES_GTK | 186 #endif // TOOLKIT_USES_GTK |
179 | 187 |
180 remoting::HostProcess me2me_host; | 188 remoting::HostProcess me2me_host; |
181 me2me_host.InitWithCommandLine(cmd_line); | 189 me2me_host.InitWithCommandLine(cmd_line); |
182 | 190 |
183 return me2me_host.Run(); | 191 return me2me_host.Run(); |
184 } | 192 } |
OLD | NEW |