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

Side by Side Diff: remoting/protocol/client_control_dispatcher.cc

Issue 9369037: Revert 121055 - Remove BeginSessionDeprecated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 months 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/proto/internal.proto ('k') | remoting/protocol/host_control_dispatcher.cc » ('j') | 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) 2012 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 #include "remoting/protocol/client_control_dispatcher.h" 5 #include "remoting/protocol/client_control_dispatcher.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "net/socket/stream_socket.h" 10 #include "net/socket/stream_socket.h"
11 #include "remoting/base/constants.h" 11 #include "remoting/base/constants.h"
(...skipping 18 matching lines...) Expand all
30 void ClientControlDispatcher::OnInitialized() { 30 void ClientControlDispatcher::OnInitialized() {
31 // TODO(garykac): Set write failed callback. 31 // TODO(garykac): Set write failed callback.
32 writer_->Init(channel(), BufferedSocketWriter::WriteFailedCallback()); 32 writer_->Init(channel(), BufferedSocketWriter::WriteFailedCallback());
33 reader_.Init(channel(), base::Bind( 33 reader_.Init(channel(), base::Bind(
34 &ClientControlDispatcher::OnMessageReceived, base::Unretained(this))); 34 &ClientControlDispatcher::OnMessageReceived, base::Unretained(this)));
35 } 35 }
36 36
37 void ClientControlDispatcher::OnMessageReceived( 37 void ClientControlDispatcher::OnMessageReceived(
38 ControlMessage* message, const base::Closure& done_task) { 38 ControlMessage* message, const base::Closure& done_task) {
39 DCHECK(client_stub_); 39 DCHECK(client_stub_);
40
40 base::ScopedClosureRunner done_runner(done_task); 41 base::ScopedClosureRunner done_runner(done_task);
41 LOG(WARNING) << "Unknown control message received."; 42
43 if (message->has_begin_session_deprecated()) {
44 // Host sends legacy BeginSession message for compatibility with
45 // older clients. Ignore it without warning.
46 } else {
47 LOG(WARNING) << "Unknown control message received.";
48 }
42 } 49 }
43 50
44 } // namespace protocol 51 } // namespace protocol
45 } // namespace remoting 52 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/proto/internal.proto ('k') | remoting/protocol/host_control_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698