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

Side by Side Diff: ipc/ipc_channel_reader_unittest.cc

Issue 1385143002: ipc: Update MachPortMac ownership semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase errors. Created 5 years, 2 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
« no previous file with comments | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_channel_win.cc » ('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 <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 9
10 #include "ipc/attachment_broker.h" 10 #include "ipc/attachment_broker.h"
(...skipping 24 matching lines...) Expand all
35 BrokerableType GetBrokerableType() const override { return WIN_HANDLE; } 35 BrokerableType GetBrokerableType() const override { return WIN_HANDLE; }
36 36
37 private: 37 private:
38 ~MockAttachment() override {} 38 ~MockAttachment() override {}
39 }; 39 };
40 40
41 class MockAttachmentBroker : public AttachmentBroker { 41 class MockAttachmentBroker : public AttachmentBroker {
42 public: 42 public:
43 typedef std::set<scoped_refptr<BrokerableAttachment>> AttachmentSet; 43 typedef std::set<scoped_refptr<BrokerableAttachment>> AttachmentSet;
44 44
45 bool SendAttachmentToProcess(const BrokerableAttachment* attachment, 45 bool SendAttachmentToProcess(BrokerableAttachment* attachment,
46 base::ProcessId destination_process) override { 46 base::ProcessId destination_process) override {
47 return false; 47 return false;
48 } 48 }
49 49
50 bool OnMessageReceived(const Message& message) override { return false; } 50 bool OnMessageReceived(const Message& message) override { return false; }
51 51
52 void AddAttachment(scoped_refptr<BrokerableAttachment> attachment) { 52 void AddAttachment(scoped_refptr<BrokerableAttachment> attachment) {
53 get_attachments()->push_back(attachment); 53 get_attachments()->push_back(attachment);
54 NotifyObservers(attachment->GetIdentifier()); 54 NotifyObservers(attachment->GetIdentifier());
55 } 55 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 header.payload_size = std::numeric_limits<int32_t>::max(); 186 header.payload_size = std::numeric_limits<int32_t>::max();
187 EXPECT_FALSE(reader.TranslateInputData( 187 EXPECT_FALSE(reader.TranslateInputData(
188 reinterpret_cast<const char*>(&header), sizeof(header))); 188 reinterpret_cast<const char*>(&header), sizeof(header)));
189 EXPECT_LE(reader.input_overflow_buf_.capacity(), capacity_before); 189 EXPECT_LE(reader.input_overflow_buf_.capacity(), capacity_before);
190 } 190 }
191 191
192 #endif // !USE_ATTACHMENT_BROKER 192 #endif // !USE_ATTACHMENT_BROKER
193 193
194 } // namespace internal 194 } // namespace internal
195 } // namespace IPC 195 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_channel_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698