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

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

Issue 4313001: Rename classes for Chromoting: (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Resolve merge conflicts Created 10 years, 1 month 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/jingle_session_unittest.cc ('k') | remoting/protocol/protobuf_video_reader.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/message_loop.h" 7 #include "base/message_loop.h"
8 #include "net/base/io_buffer.h" 8 #include "net/base/io_buffer.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/socket/socket.h" 10 #include "net/socket/socket.h"
11 #include "remoting/base/multiple_array_input_stream.h" 11 #include "remoting/base/multiple_array_input_stream.h"
12 #include "remoting/proto/internal.pb.h" 12 #include "remoting/proto/internal.pb.h"
13 #include "remoting/protocol/chromotocol_connection.h"
14 13
15 namespace remoting { 14 namespace remoting {
16 15
17 static const int kReadBufferSize = 4096; 16 static const int kReadBufferSize = 4096;
18 17
19 MessageReader::MessageReader() 18 MessageReader::MessageReader()
20 : socket_(NULL), 19 : socket_(NULL),
21 closed_(false), 20 closed_(false),
22 ALLOW_THIS_IN_INITIALIZER_LIST( 21 ALLOW_THIS_IN_INITIALIZER_LIST(
23 read_callback_(this, &MessageReader::OnRead)) { 22 read_callback_(this, &MessageReader::OnRead)) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void MessageReader::HandleReadResult(int result) { 59 void MessageReader::HandleReadResult(int result) {
61 if (result > 0) { 60 if (result > 0) {
62 data_received_callback_->Run(read_buffer_, result); 61 data_received_callback_->Run(read_buffer_, result);
63 } else { 62 } else {
64 if (result != net::ERR_IO_PENDING) 63 if (result != net::ERR_IO_PENDING)
65 LOG(ERROR) << "Read() returned error " << result; 64 LOG(ERROR) << "Read() returned error " << result;
66 } 65 }
67 } 66 }
68 67
69 } // namespace remoting 68 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/jingle_session_unittest.cc ('k') | remoting/protocol/protobuf_video_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698