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

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

Issue 8764012: Set empty shared secret for Me2Me hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 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
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | no next file » | 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) 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 is an application of a minimal host process in a Chromoting 5 // This is an application of a minimal host process in a Chromoting
6 // system. It serves the purpose of gluing different pieces together 6 // system. It serves the purpose of gluing different pieces together
7 // to make a functional host process for testing. 7 // to make a functional host process for testing.
8 // 8 //
9 // It peforms the following functionality: 9 // It peforms the following functionality:
10 // 1. Connect to the GTalk network and register the machine as a host. 10 // 1. Connect to the GTalk network and register the machine as a host.
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 new remoting::HeartbeatSender(context.network_message_loop(), 182 new remoting::HeartbeatSender(context.network_message_loop(),
183 config)); 183 config));
184 if (!heartbeat_sender->Init()) 184 if (!heartbeat_sender->Init())
185 return 1; 185 return 1;
186 host_->AddStatusObserver(heartbeat_sender.get()); 186 host_->AddStatusObserver(heartbeat_sender.get());
187 } 187 }
188 host_->AddStatusObserver(log_to_server.get()); 188 host_->AddStatusObserver(log_to_server.get());
189 189
190 // Let the chromoting host run until the shutdown task is executed. 190 // Let the chromoting host run until the shutdown task is executed.
191 host_->Start(); 191 host_->Start();
192
193 // Set an empty shared-secret for Me2Me.
194 // TODO(lambroslambrou): This is a temporary fix, pending a Me2Me-specific
195 // AuthenticatorFactory - crbug.com/105214.
196 if (!is_it2me_) {
197 context.network_message_loop()->PostTask(
198 FROM_HERE, base::Bind(&ChromotingHost::SetSharedSecret, host_.get(),
199 ""));
200 }
201
192 message_loop.MessageLoop::Run(); 202 message_loop.MessageLoop::Run();
193 203
194 // And then stop the chromoting context. 204 // And then stop the chromoting context.
195 context.Stop(); 205 context.Stop();
196 file_io_thread.Stop(); 206 file_io_thread.Stop();
197 207
198 host_ = NULL; 208 host_ = NULL;
199 209
200 return 0; 210 return 0;
201 } 211 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 LOG(ERROR) << "Unknown video codec: " << video_codec; 305 LOG(ERROR) << "Unknown video codec: " << video_codec;
296 return 1; 306 return 1;
297 } 307 }
298 config->mutable_video_configs()->push_back(ChannelConfig( 308 config->mutable_video_configs()->push_back(ChannelConfig(
299 transport, remoting::protocol::kDefaultStreamVersion, codec)); 309 transport, remoting::protocol::kDefaultStreamVersion, codec));
300 simple_host.set_protocol_config(config.release()); 310 simple_host.set_protocol_config(config.release());
301 } 311 }
302 312
303 return simple_host.Run(); 313 return simple_host.Run();
304 } 314 }
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698