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

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

Issue 7312013: Minor cleanups in JingleSession and JingleSessionManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 5 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
OLDNEW
1 // Copyright (c) 2011 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/connection_to_client.h" 5 #include "remoting/protocol/connection_to_client.h"
6 6
7 #include "google/protobuf/message.h" 7 #include "google/protobuf/message.h"
8 #include "net/base/io_buffer.h" 8 #include "net/base/io_buffer.h"
9 #include "remoting/protocol/client_control_sender.h" 9 #include "remoting/protocol/client_control_sender.h"
10 #include "remoting/protocol/host_message_dispatcher.h" 10 #include "remoting/protocol/host_message_dispatcher.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // This method can be called from main thread so perform threading switching. 51 // This method can be called from main thread so perform threading switching.
52 if (MessageLoop::current() != loop_) { 52 if (MessageLoop::current() != loop_) {
53 loop_->PostTask( 53 loop_->PostTask(
54 FROM_HERE, 54 FROM_HERE,
55 NewRunnableMethod(this, &ConnectionToClient::Disconnect)); 55 NewRunnableMethod(this, &ConnectionToClient::Disconnect));
56 return; 56 return;
57 } 57 }
58 58
59 CloseChannels(); 59 CloseChannels();
60 60
61 // If there is a channel then close it and release the reference. 61 // If there is a channel then close it and release the reference.
Wez 2011/07/06 21:24:25 nit: Update this comment, e.g. "... release it, ca
Sergey Ulanov 2011/07/06 23:15:01 Done.
62 if (session_.get()) { 62 if (session_.get())
63 session_->Close();
64 session_.reset(); 63 session_.reset();
65 }
66 } 64 }
67 65
68 void ConnectionToClient::UpdateSequenceNumber(int64 sequence_number) { 66 void ConnectionToClient::UpdateSequenceNumber(int64 sequence_number) {
69 handler_->OnSequenceNumberUpdated(this, sequence_number); 67 handler_->OnSequenceNumberUpdated(this, sequence_number);
70 } 68 }
71 69
72 VideoStub* ConnectionToClient::video_stub() { 70 VideoStub* ConnectionToClient::video_stub() {
73 return video_writer_.get(); 71 return video_writer_.get();
74 } 72 }
75 73
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 119
122 void ConnectionToClient::CloseChannels() { 120 void ConnectionToClient::CloseChannels() {
123 if (video_writer_.get()) 121 if (video_writer_.get())
124 video_writer_->Close(); 122 video_writer_->Close();
125 if (client_control_sender_.get()) 123 if (client_control_sender_.get())
126 client_control_sender_->Close(); 124 client_control_sender_->Close();
127 } 125 }
128 126
129 } // namespace protocol 127 } // namespace protocol
130 } // namespace remoting 128 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698