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

Unified Diff: mojo/common/interface_ptr_set.h

Issue 1237653005: Rename WeakInterfacePtrSet to InterfacePtrSet. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
Index: mojo/common/interface_ptr_set.h
diff --git a/mojo/common/weak_interface_ptr_set.h b/mojo/common/interface_ptr_set.h
similarity index 81%
rename from mojo/common/weak_interface_ptr_set.h
rename to mojo/common/interface_ptr_set.h
index b668a461993ff19880b2a305bd57ad427fe1cca1..a08a7289696c4d0812f1d98d6471c404a38e0e4c 100644
--- a/mojo/common/weak_interface_ptr_set.h
+++ b/mojo/common/interface_ptr_set.h
@@ -2,28 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_
-#define MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_
+#ifndef MOJO_COMMON_INTERFACE_PTR_SET_H_
+#define MOJO_COMMON_INTERFACE_PTR_SET_H_
#include <vector>
#include "base/logging.h"
-#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/bindings/interface_ptr.h"
namespace mojo {
-// A WeakInterfacePtrSet contains a collection of InterfacePtrs
+// An InterfacePtrSet contains a collection of InterfacePtrs
// that are automatically removed from the collection and destroyed
// when their associated MessagePipe experiences a connection error.
// When the set is destroyed all of the MessagePipes will be closed.
-// TODO(rudominer) Rename this class since the ownership of the elements
-// is not "weak" from the point of view of the client.
template <typename Interface>
-class WeakInterfacePtrSet {
+class InterfacePtrSet {
public:
- WeakInterfacePtrSet() {}
- ~WeakInterfacePtrSet() { CloseAll(); }
+ InterfacePtrSet() {}
+ ~InterfacePtrSet() { CloseAll(); }
// |ptr| must be bound to a message pipe.
void AddInterfacePtr(InterfacePtr<Interface> ptr) {
@@ -72,4 +69,4 @@ class WeakInterfacePtrSet {
} // namespace mojo
-#endif // MOJO_COMMON_WEAK_INTERFACE_PTR_SET_H_
+#endif // MOJO_COMMON_INTERFACE_PTR_SET_H_

Powered by Google App Engine
This is Rietveld 408576698