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 | |
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')
-rw-r--r-- | remoting/proto/control.proto | 13 | ||||
-rw-r--r-- | remoting/proto/internal.proto | 3 | ||||
-rw-r--r-- | remoting/protocol/client_control_dispatcher.cc | 11 | ||||
-rw-r--r-- | remoting/protocol/host_control_dispatcher.cc | 9 |
4 files changed, 31 insertions, 5 deletions
diff --git a/remoting/proto/control.proto b/remoting/proto/control.proto index 3e7e2cc..a36169e 100644 --- a/remoting/proto/control.proto +++ b/remoting/proto/control.proto @@ -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. // @@ -10,3 +10,14 @@ option optimize_for = LITE_RUNTIME; package remoting.protocol; +// BeginSessionDeprecated is sent from host to client when the session +// starts. Legacy clients expect to receive this message at the +// beginning of each session. Current clients ignore it. +// +// TODO(sergeyu): Remove this message. See http://crbug.com/104670 . +message LocalLoginStatusDeprecated { + optional bool success = 1; +} +message BeginSessionDeprecated { + optional LocalLoginStatusDeprecated login_status = 1; +} diff --git a/remoting/proto/internal.proto b/remoting/proto/internal.proto index 8ff9627..90ee147 100644 --- a/remoting/proto/internal.proto +++ b/remoting/proto/internal.proto @@ -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. @@ -16,6 +16,7 @@ package remoting.protocol; // Represents a message being sent on the control channel. message ControlMessage { + optional BeginSessionDeprecated begin_session_deprecated = 4; } // Defines an event message on the event channel. 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( |