diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-09 19:08:08 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-09 19:08:08 +0000 |
commit | a0754d68b29b013fbeb833a0658e26bf2d562b95 (patch) | |
tree | f9045db0fb36aad9e956a7e70233fcec3b4e4b56 /remoting/protocol | |
parent | 7c7338e7266fb3c60f9203518f9bb66b84f82814 (diff) | |
download | chromium_src-a0754d68b29b013fbeb833a0658e26bf2d562b95.zip chromium_src-a0754d68b29b013fbeb833a0658e26bf2d562b95.tar.gz chromium_src-a0754d68b29b013fbeb833a0658e26bf2d562b95.tar.bz2 |
Revert 121055 - Remove BeginSessionDeprecated.
Once M17 is released no clients will need BeginSession
message from the host, so it's safe to remove it.
BUG=104670
Review URL: https://chromiumcodereview.appspot.com/9243021
TBR=sergeyu@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9369037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121261 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol')
-rw-r--r-- | remoting/protocol/client_control_dispatcher.cc | 11 | ||||
-rw-r--r-- | remoting/protocol/host_control_dispatcher.cc | 9 |
2 files changed, 17 insertions, 3 deletions
diff --git a/remoting/protocol/client_control_dispatcher.cc b/remoting/protocol/client_control_dispatcher.cc index 79ae7be..54e1d1c 100644 --- a/remoting/protocol/client_control_dispatcher.cc +++ b/remoting/protocol/client_control_dispatcher.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -37,8 +37,15 @@ void ClientControlDispatcher::OnInitialized() { void ClientControlDispatcher::OnMessageReceived( ControlMessage* message, const base::Closure& done_task) { DCHECK(client_stub_); + base::ScopedClosureRunner done_runner(done_task); - LOG(WARNING) << "Unknown control message received."; + + if (message->has_begin_session_deprecated()) { + // Host sends legacy BeginSession message for compatibility with + // older clients. Ignore it without warning. + } else { + LOG(WARNING) << "Unknown control message received."; + } } } // namespace protocol diff --git a/remoting/protocol/host_control_dispatcher.cc b/remoting/protocol/host_control_dispatcher.cc index a51058c..43f4f8f 100644 --- a/remoting/protocol/host_control_dispatcher.cc +++ b/remoting/protocol/host_control_dispatcher.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -30,6 +30,13 @@ void HostControlDispatcher::OnInitialized() { reader_.Init(channel(), base::Bind( &HostControlDispatcher::OnMessageReceived, base::Unretained(this))); writer_->Init(channel(), BufferedSocketWriter::WriteFailedCallback()); + + // Write legacy BeginSession message. + // TODO(sergeyu): Remove it. See http://crbug.com/104670 . + protocol::ControlMessage message; + message.mutable_begin_session_deprecated()->mutable_login_status()-> + set_success(true); + writer_->Write(SerializeAndFrameMessage(message), base::Closure()); } void HostControlDispatcher::OnMessageReceived( |