Project import generated by Copybara.
PiperOrigin-RevId: 224614037
Change-Id: I14e53449d4aeccb328f86828c76b5f09dea0d4b8
diff --git a/http2/platform/api/http2_reconstruct_object.h b/http2/platform/api/http2_reconstruct_object.h
new file mode 100644
index 0000000..ddcb312
--- /dev/null
+++ b/http2/platform/api/http2_reconstruct_object.h
@@ -0,0 +1,34 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef QUICHE_HTTP2_PLATFORM_API_HTTP2_RECONSTRUCT_OBJECT_H_
+#define QUICHE_HTTP2_PLATFORM_API_HTTP2_RECONSTRUCT_OBJECT_H_
+
+#include <utility>
+
+#include "net/http2/platform/impl/http2_reconstruct_object_impl.h"
+
+namespace http2 {
+namespace test {
+
+class Http2Random;
+
+// Reconstruct an object so that it is initialized as when it was first
+// constructed. Runs the destructor to handle objects that might own resources,
+// and runs the constructor with the provided arguments, if any.
+template <class T, class... Args>
+void Http2ReconstructObject(T* ptr, Http2Random* rng, Args&&... args) {
+ Http2ReconstructObjectImpl(ptr, rng, std::forward<Args>(args)...);
+}
+
+// This version applies default-initialization to the object.
+template <class T>
+void Http2DefaultReconstructObject(T* ptr, Http2Random* rng) {
+ Http2DefaultReconstructObjectImpl(ptr, rng);
+}
+
+} // namespace test
+} // namespace http2
+
+#endif // QUICHE_HTTP2_PLATFORM_API_HTTP2_RECONSTRUCT_OBJECT_H_