Chromium Code Reviews| Index: remoting/host/chromoting_host.cc |
| diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc |
| index 86ba1c0739019ae5bacb3aeb59731523b78dcc08..4b2ef5f22616a5eb3d3c4f191e27c30fab874667 100644 |
| --- a/remoting/host/chromoting_host.cc |
| +++ b/remoting/host/chromoting_host.cc |
| @@ -277,10 +277,9 @@ void ChromotingHost::OnIncomingSession( |
| *protocol_config_->mutable_initial_resolution() = |
| protocol::ScreenResolution(2048, 2048); |
| // TODO(sergeyu): Respect resolution requested by the client if supported. |
| - protocol::SessionConfig* config = protocol_config_->Select( |
| - session->candidate_config(), true /* force_host_resolution */); |
| - |
| - if (!config) { |
| + protocol::SessionConfig config; |
| + if (!protocol_config_->Select(session->candidate_config(), |
| + true /* force_host_resolution */, &config)) { |
| LOG(WARNING) << "Rejecting connection from " << session->jid() |
| << " because no compatible configuration has been found."; |
| *response = protocol::SessionManager::INCOMPATIBLE; |
| @@ -406,8 +405,8 @@ void ChromotingHost::OnClientDisconnected(ConnectionToClient* connection) { |
| } |
| // TODO(sergeyu): Move this to SessionManager? |
| -Encoder* ChromotingHost::CreateEncoder(const protocol::SessionConfig* config) { |
| - const protocol::ChannelConfig& video_config = config->video_config(); |
| +Encoder* ChromotingHost::CreateEncoder(const protocol::SessionConfig& config) { |
| + const protocol::ChannelConfig& video_config = config.video_config(); |
| if (video_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { |
| return EncoderRowBased::CreateVerbatimEncoder(); |
| @@ -455,6 +454,8 @@ void ChromotingHost::LocalLoginSucceeded( |
| return; |
| } |
| + DCHECK_EQ(context_->main_message_loop(), MessageLoop::current()); |
|
Wez
2011/09/10 01:04:29
We don't need this, surely, since the preceding li
Sergey Ulanov
2011/09/10 06:45:58
Right. Added it by mistake.
|
| + |
| protocol::LocalLoginStatus* status = new protocol::LocalLoginStatus(); |
| status->set_success(true); |
| connection->client_stub()->BeginSessionResponse( |