| OLD | NEW |
| 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/message_reader.h" | 5 #include "remoting/protocol/message_reader.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/location.h" |
| 9 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| 10 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 11 #include "net/socket/socket.h" | 12 #include "net/socket/socket.h" |
| 12 #include "remoting/base/compound_buffer.h" | 13 #include "remoting/base/compound_buffer.h" |
| 13 #include "remoting/proto/internal.pb.h" | 14 #include "remoting/proto/internal.pb.h" |
| 14 | 15 |
| 15 namespace remoting { | 16 namespace remoting { |
| 16 namespace protocol { | 17 namespace protocol { |
| 17 | 18 |
| 18 static const int kReadBufferSize = 4096; | 19 static const int kReadBufferSize = 4096; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 117 |
| 117 void MessageReader::ProcessDoneEvent() { | 118 void MessageReader::ProcessDoneEvent() { |
| 118 pending_messages_--; | 119 pending_messages_--; |
| 119 DCHECK_GE(pending_messages_, 0); | 120 DCHECK_GE(pending_messages_, 0); |
| 120 | 121 |
| 121 DoRead(); // Start next read if neccessary. | 122 DoRead(); // Start next read if neccessary. |
| 122 } | 123 } |
| 123 | 124 |
| 124 } // namespace protocol | 125 } // namespace protocol |
| 125 } // namespace remoting | 126 } // namespace remoting |
| OLD | NEW |