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

Unified Diff: mojo/common/binding_set.h

Issue 1250463002: Renames WeakBindingSet to BindingSet. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebasing Created 5 years, 5 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/common/BUILD.gn ('k') | mojo/common/binding_set_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/binding_set.h
diff --git a/mojo/common/weak_binding_set.h b/mojo/common/binding_set.h
similarity index 80%
rename from mojo/common/weak_binding_set.h
rename to mojo/common/binding_set.h
index 203e8c3242ec2cc22f65fd17ff41fa54c2da690b..6e81e766217479fc6282128f1f59a24a6a087105 100644
--- a/mojo/common/weak_binding_set.h
+++ b/mojo/common/binding_set.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MOJO_COMMON_WEAK_BINDING_SET_H_
-#define MOJO_COMMON_WEAK_BINDING_SET_H_
+#ifndef MOJO_COMMON_BINDING_SET_H_
+#define MOJO_COMMON_BINDING_SET_H_
#include <algorithm>
#include <vector>
@@ -16,10 +16,10 @@ namespace mojo {
// Use this class to manage a set of bindings each of which is
// owned by the pipe it is bound to.
template <typename Interface>
-class WeakBindingSet {
+class BindingSet {
public:
- WeakBindingSet() {}
- ~WeakBindingSet() { CloseAllBindings(); }
+ BindingSet() {}
+ ~BindingSet() { CloseAllBindings(); }
void AddBinding(Interface* impl, InterfaceRequest<Interface> request) {
bindings_.emplace_back(new Binding<Interface>(impl, request.Pass()));
@@ -37,18 +37,16 @@ class WeakBindingSet {
});
}
- void CloseAllBindings() {
- bindings_.clear();
- }
+ void CloseAllBindings() { bindings_.clear(); }
size_t size() const { return bindings_.size(); }
private:
std::vector<std::unique_ptr<Binding<Interface>>> bindings_;
- DISALLOW_COPY_AND_ASSIGN(WeakBindingSet);
+ DISALLOW_COPY_AND_ASSIGN(BindingSet);
};
} // namespace mojo
-#endif // MOJO_COMMON_WEAK_BINDING_SET_H_
+#endif // MOJO_COMMON_BINDING_SET_H_
« no previous file with comments | « mojo/common/BUILD.gn ('k') | mojo/common/binding_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698