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

Side by Side Diff: ipc/ipc_channel_reader_unittest.cc

Issue 2493623002: Remove IPC::Endpoint. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_endpoint.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 29 matching lines...) Expand all
40 bool ShouldDispatchInputMessage(Message* msg) override { return true; } 40 bool ShouldDispatchInputMessage(Message* msg) override { return true; }
41 41
42 bool GetNonBrokeredAttachments(Message* msg) override { return true; } 42 bool GetNonBrokeredAttachments(Message* msg) override { return true; }
43 43
44 bool DidEmptyInputBuffers() override { return true; } 44 bool DidEmptyInputBuffers() override { return true; }
45 45
46 void HandleInternalMessage(const Message& msg) override {} 46 void HandleInternalMessage(const Message& msg) override {}
47 47
48 void DispatchMessage(Message* m) override { last_dispatched_message_ = m; } 48 void DispatchMessage(Message* m) override { last_dispatched_message_ = m; }
49 49
50 base::ProcessId GetSenderPID() override { return base::kNullProcessId; }
51
52 Message* get_last_dispatched_message() { return last_dispatched_message_; } 50 Message* get_last_dispatched_message() { return last_dispatched_message_; }
53 51
54 void AppendData(const void* data, size_t size) { 52 void AppendData(const void* data, size_t size) {
55 data_.append(static_cast<const char*>(data), size); 53 data_.append(static_cast<const char*>(data), size);
56 } 54 }
57 55
58 void AppendMessageData(const Message& message) { 56 void AppendMessageData(const Message& message) {
59 AppendData(message.data(), message.size()); 57 AppendData(message.data(), message.size());
60 } 58 }
61 59
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 reader.ProcessIncomingMessages()); 241 reader.ProcessIncomingMessages());
244 242
245 // We determined message size for the second (partial) message, so 243 // We determined message size for the second (partial) message, so
246 // we resized the buffer to fit. 244 // we resized the buffer to fit.
247 EXPECT_GE(reader.input_overflow_buf_.capacity(), message2.size()); 245 EXPECT_GE(reader.input_overflow_buf_.capacity(), message2.size());
248 } 246 }
249 } 247 }
250 248
251 } // namespace internal 249 } // namespace internal
252 } // namespace IPC 250 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698