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

Side by Side Diff: ipc/ipc_channel_reader.cc

Issue 10541065: Separate out IPC::Message::Sender and channel::Listener into a separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gclient runhooks Created 8 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ipc/ipc_channel_reader.h" 5 #include "ipc/ipc_channel_reader.h"
6 6
7 namespace IPC { 7 namespace IPC {
8 namespace internal { 8 namespace internal {
9 9
10 ChannelReader::ChannelReader(Channel::Listener* listener) 10 ChannelReader::ChannelReader(ChannelListener* listener)
11 : listener_(listener) { 11 : listener_(listener) {
12 memset(input_buf_, 0, sizeof(input_buf_)); 12 memset(input_buf_, 0, sizeof(input_buf_));
13 } 13 }
14 14
15 ChannelReader::~ChannelReader() { 15 ChannelReader::~ChannelReader() {
16 } 16 }
17 17
18 bool ChannelReader::ProcessIncomingMessages() { 18 bool ChannelReader::ProcessIncomingMessages() {
19 while (true) { 19 while (true) {
20 int bytes_read = 0; 20 int bytes_read = 0;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 input_overflow_buf_.assign(p, end - p); 85 input_overflow_buf_.assign(p, end - p);
86 86
87 if (input_overflow_buf_.empty() && !DidEmptyInputBuffers()) 87 if (input_overflow_buf_.empty() && !DidEmptyInputBuffers())
88 return false; 88 return false;
89 return true; 89 return true;
90 } 90 }
91 91
92 92
93 } // namespace internal 93 } // namespace internal
94 } // namespace IPC 94 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698