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

Side by Side Diff: mojo/public/cpp/bindings/lib/multiplex_router.h

Issue 2340363002: Mojo C++ bindings: add more perf tests for Router/MultiplexRouter. (Closed)
Patch Set: Created 4 years, 3 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
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 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 DCHECK(thread_checker_.CalledOnValidThread()); 122 DCHECK(thread_checker_.CalledOnValidThread());
123 return connector_.is_valid(); 123 return connector_.is_valid();
124 } 124 }
125 125
126 // TODO(yzshen): consider removing this getter. 126 // TODO(yzshen): consider removing this getter.
127 MessagePipeHandle handle() const { 127 MessagePipeHandle handle() const {
128 DCHECK(thread_checker_.CalledOnValidThread()); 128 DCHECK(thread_checker_.CalledOnValidThread());
129 return connector_.handle(); 129 return connector_.handle();
130 } 130 }
131 131
132 bool SimulateReceivingMessageForTesting(Message* message) {
133 return filters_.Accept(message);
134 }
135
132 private: 136 private:
133 class InterfaceEndpoint; 137 class InterfaceEndpoint;
134 struct Task; 138 struct Task;
135 139
136 ~MultiplexRouter() override; 140 ~MultiplexRouter() override;
137 141
138 // MessageReceiver implementation: 142 // MessageReceiver implementation:
139 bool Accept(Message* message) override; 143 bool Accept(Message* message) override;
140 144
141 // PipeControlMessageHandlerDelegate implementation: 145 // PipeControlMessageHandlerDelegate implementation:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 240
237 bool testing_mode_; 241 bool testing_mode_;
238 242
239 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter); 243 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter);
240 }; 244 };
241 245
242 } // namespace internal 246 } // namespace internal
243 } // namespace mojo 247 } // namespace mojo
244 248
245 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ 249 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/interface_endpoint_client.cc ('k') | mojo/public/cpp/bindings/lib/router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698