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

Side by Side Diff: remoting/protocol/host_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/protocol/client_control_dispatcher.cc ('k') | no next file » | 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/host_control_dispatcher.h" 5 #include "remoting/protocol/host_control_dispatcher.h"
6 6
7 #include "base/message_loop_proxy.h" 7 #include "base/message_loop_proxy.h"
8 #include "net/socket/stream_socket.h" 8 #include "net/socket/stream_socket.h"
9 #include "remoting/base/constants.h" 9 #include "remoting/base/constants.h"
10 #include "remoting/proto/control.pb.h" 10 #include "remoting/proto/control.pb.h"
11 #include "remoting/proto/internal.pb.h" 11 #include "remoting/proto/internal.pb.h"
(...skipping 11 matching lines...) Expand all
23 } 23 }
24 24
25 HostControlDispatcher::~HostControlDispatcher() { 25 HostControlDispatcher::~HostControlDispatcher() {
26 writer_->Close(); 26 writer_->Close();
27 } 27 }
28 28
29 void HostControlDispatcher::OnInitialized() { 29 void HostControlDispatcher::OnInitialized() {
30 reader_.Init(channel(), base::Bind( 30 reader_.Init(channel(), base::Bind(
31 &HostControlDispatcher::OnMessageReceived, base::Unretained(this))); 31 &HostControlDispatcher::OnMessageReceived, base::Unretained(this)));
32 writer_->Init(channel(), BufferedSocketWriter::WriteFailedCallback()); 32 writer_->Init(channel(), BufferedSocketWriter::WriteFailedCallback());
33
34 // Write legacy BeginSession message.
35 // TODO(sergeyu): Remove it. See http://crbug.com/104670 .
36 protocol::ControlMessage message;
37 message.mutable_begin_session_deprecated()->mutable_login_status()->
38 set_success(true);
39 writer_->Write(SerializeAndFrameMessage(message), base::Closure());
33 } 40 }
34 41
35 void HostControlDispatcher::OnMessageReceived( 42 void HostControlDispatcher::OnMessageReceived(
36 ControlMessage* message, const base::Closure& done_task) { 43 ControlMessage* message, const base::Closure& done_task) {
37 DCHECK(host_stub_); 44 DCHECK(host_stub_);
38 LOG(WARNING) << "Unknown control message received."; 45 LOG(WARNING) << "Unknown control message received.";
39 done_task.Run(); 46 done_task.Run();
40 } 47 }
41 48
42 } // namespace protocol 49 } // namespace protocol
43 } // namespace remoting 50 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/client_control_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698