| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 last_filter_event_(NONE), | 138 last_filter_event_(NONE), |
| 139 message_filtering_enabled_(false) {} | 139 message_filtering_enabled_(false) {} |
| 140 | 140 |
| 141 MessageCountFilter(uint32_t supported_message_class) | 141 MessageCountFilter(uint32_t supported_message_class) |
| 142 : messages_received_(0), | 142 : messages_received_(0), |
| 143 supported_message_class_(supported_message_class), | 143 supported_message_class_(supported_message_class), |
| 144 is_global_filter_(false), | 144 is_global_filter_(false), |
| 145 last_filter_event_(NONE), | 145 last_filter_event_(NONE), |
| 146 message_filtering_enabled_(false) {} | 146 message_filtering_enabled_(false) {} |
| 147 | 147 |
| 148 void OnFilterAdded(IPC::Sender* sender) override { | 148 void OnFilterAdded(IPC::Channel* channel) override { |
| 149 EXPECT_TRUE(sender); | 149 EXPECT_TRUE(channel); |
| 150 EXPECT_EQ(NONE, last_filter_event_); | 150 EXPECT_EQ(NONE, last_filter_event_); |
| 151 last_filter_event_ = FILTER_ADDED; | 151 last_filter_event_ = FILTER_ADDED; |
| 152 } | 152 } |
| 153 | 153 |
| 154 void OnChannelConnected(int32_t peer_pid) override { | 154 void OnChannelConnected(int32_t peer_pid) override { |
| 155 EXPECT_EQ(FILTER_ADDED, last_filter_event_); | 155 EXPECT_EQ(FILTER_ADDED, last_filter_event_); |
| 156 EXPECT_NE(static_cast<int32_t>(base::kNullProcessId), peer_pid); | 156 EXPECT_NE(static_cast<int32_t>(base::kNullProcessId), peer_pid); |
| 157 last_filter_event_ = CHANNEL_CONNECTED; | 157 last_filter_event_ = CHANNEL_CONNECTED; |
| 158 } | 158 } |
| 159 | 159 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 IPCTestBase::GetChannelName("ChannelProxyClient"), &listener, | 431 IPCTestBase::GetChannelName("ChannelProxyClient"), &listener, |
| 432 main_message_loop.task_runner())); | 432 main_message_loop.task_runner())); |
| 433 CHECK(channel->Connect()); | 433 CHECK(channel->Connect()); |
| 434 listener.Init(channel.get()); | 434 listener.Init(channel.get()); |
| 435 | 435 |
| 436 base::RunLoop().Run(); | 436 base::RunLoop().Run(); |
| 437 return 0; | 437 return 0; |
| 438 } | 438 } |
| 439 | 439 |
| 440 } // namespace | 440 } // namespace |
| OLD | NEW |