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

Unified Diff: mojo/public/cpp/bindings/lib/filter_chain.cc

Issue 2203243002: Reduce code size of BindingState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@before-sharing
Patch Set: Address rockot's review comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/lib/filter_chain.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/filter_chain.cc
diff --git a/mojo/public/cpp/bindings/lib/filter_chain.cc b/mojo/public/cpp/bindings/lib/filter_chain.cc
index 899bac1624a28256151558b6d121fb8b7ffc79bf..58bdbd55df27a365653ca09efe90f5be63dbc965 100644
--- a/mojo/public/cpp/bindings/lib/filter_chain.cc
+++ b/mojo/public/cpp/bindings/lib/filter_chain.cc
@@ -45,5 +45,11 @@ MessageReceiver* FilterChain::GetHead() {
return filters_.empty() ? sink_ : filters_.front();
}
+void FilterChain::Append(MessageFilter* filter) {
+ if (!filters_.empty())
+ filters_.back()->set_sink(filter);
+ filters_.push_back(filter);
+}
+
} // namespace internal
} // namespace mojo
« no previous file with comments | « mojo/public/cpp/bindings/lib/filter_chain.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698