Switch the experimental use of absl from absl::node_hash_map to absl::WrapUnique.
This CL partially reverts cl/328561880
Apparently absl::node_hash_map is currently not included in the Abseil component, and I don't want us to block on this.
PiperOrigin-RevId: 328608082
Change-Id: I2bda8bcdf8d081fd771587baf9d2a1ee3d40d510
diff --git a/common/platform/api/quiche_ptr_util.h b/common/platform/api/quiche_ptr_util.h
index 7a1aa0e..a59a595 100644
--- a/common/platform/api/quiche_ptr_util.h
+++ b/common/platform/api/quiche_ptr_util.h
@@ -7,13 +7,16 @@
#include <memory>
+#include "absl/memory/memory.h"
#include "net/quiche/common/platform/impl/quiche_ptr_util_impl.h"
namespace quiche {
template <typename T>
std::unique_ptr<T> QuicheWrapUnique(T* ptr) {
- return QuicheWrapUniqueImpl<T>(ptr);
+ // TODO(b/166325009): replace this in code with absl::WrapUnique and delete
+ // this function.
+ return absl::WrapUnique<T>(ptr);
}
} // namespace quiche
diff --git a/common/platform/api/quiche_unordered_containers.h b/common/platform/api/quiche_unordered_containers.h
index fd0c391..a53a206 100644
--- a/common/platform/api/quiche_unordered_containers.h
+++ b/common/platform/api/quiche_unordered_containers.h
@@ -7,7 +7,6 @@
#include <functional>
-#include "absl/container/node_hash_map.h"
#include "net/quiche/common/platform/impl/quiche_unordered_containers_impl.h"
namespace quiche {
@@ -17,13 +16,11 @@
using QuicheDefaultHasher = QuicheDefaultHasherImpl<Key>;
// A general-purpose unordered map.
-// TODO(b/166325009): replace this in code with flat_hash_map/node_hash_map as
-// appropriate.
template <typename Key,
typename Value,
typename Hash = QuicheDefaultHasher<Key>,
typename Eq = std::equal_to<Key>>
-using QuicheUnorderedMap = absl::node_hash_map<Key, Value, Hash, Eq>;
+using QuicheUnorderedMap = QuicheUnorderedMapImpl<Key, Value, Hash, Eq>;
} // namespace quiche