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

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: Cache parameter of SetSharedSecret() and use it when session manager is created. 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
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 new remoting::HeartbeatSender(context.network_message_loop(), 185 new remoting::HeartbeatSender(context.network_message_loop(),
186 config)); 186 config));
187 if (!heartbeat_sender->Init()) 187 if (!heartbeat_sender->Init())
188 return 1; 188 return 1;
189 host_->AddStatusObserver(heartbeat_sender.get()); 189 host_->AddStatusObserver(heartbeat_sender.get());
190 } 190 }
191 host_->AddStatusObserver(log_to_server.get()); 191 host_->AddStatusObserver(log_to_server.get());
192 192
193 // Let the chromoting host run until the shutdown task is executed. 193 // Let the chromoting host run until the shutdown task is executed.
194 host_->Start(); 194 host_->Start();
195
196 // Set an empty shared-secret for Me2Me.
197 // TODO(lambroslambrou): This is a temporary fix, pending a Me2Me-specific
198 // AuthenticatorFactory - crbug.com/105214.
199 if (!is_it2me_) {
200 context.network_message_loop()->PostTask(
201 FROM_HERE, base::Bind(&ChromotingHost::SetSharedSecret, host_.get(),
202 ""));
203 }
204
195 message_loop.MessageLoop::Run(); 205 message_loop.MessageLoop::Run();
196 206
197 // And then stop the chromoting context. 207 // And then stop the chromoting context.
198 context.Stop(); 208 context.Stop();
199 file_io_thread.Stop(); 209 file_io_thread.Stop();
200 210
201 host_ = NULL; 211 host_ = NULL;
202 212
203 return 0; 213 return 0;
204 } 214 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 LOG(ERROR) << "Unknown video codec: " << video_codec; 308 LOG(ERROR) << "Unknown video codec: " << video_codec;
299 return 1; 309 return 1;
300 } 310 }
301 config->mutable_video_configs()->push_back(ChannelConfig( 311 config->mutable_video_configs()->push_back(ChannelConfig(
302 transport, remoting::protocol::kDefaultStreamVersion, codec)); 312 transport, remoting::protocol::kDefaultStreamVersion, codec));
303 simple_host.set_protocol_config(config.release()); 313 simple_host.set_protocol_config(config.release());
304 } 314 }
305 315
306 return simple_host.Run(); 316 return simple_host.Run();
307 } 317 }
OLDNEW
« remoting/host/chromoting_host.cc ('K') | « remoting/host/remoting_me2me_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698