Move SpdyWrapUnique to QuicheWrapUnique.
This is part of the overall effort to merge quic, spdy, and http2 platform in
QUICHE.
gfe-relnote: n/a, no functional change.
PiperOrigin-RevId: 289767079
Change-Id: I036b835a38ecfa8732588981820c526c9bf641ea
diff --git a/common/platform/api/quiche_ptr_util.h b/common/platform/api/quiche_ptr_util.h
new file mode 100644
index 0000000..7a1aa0e
--- /dev/null
+++ b/common/platform/api/quiche_ptr_util.h
@@ -0,0 +1,21 @@
+// 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_COMMON_PLATFORM_API_QUICHE_PTR_UTIL_H_
+#define QUICHE_COMMON_PLATFORM_API_QUICHE_PTR_UTIL_H_
+
+#include <memory>
+
+#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);
+}
+
+} // namespace quiche
+
+#endif // QUICHE_COMMON_PLATFORM_API_QUICHE_PTR_UTIL_H_
diff --git a/spdy/core/spdy_framer.cc b/spdy/core/spdy_framer.cc
index cf2201c..7b3d388 100644
--- a/spdy/core/spdy_framer.cc
+++ b/spdy/core/spdy_framer.cc
@@ -12,6 +12,7 @@
#include <utility>
#include "net/third_party/quiche/src/http2/platform/api/http2_macros.h"
+#include "net/third_party/quiche/src/common/platform/api/quiche_ptr_util.h"
#include "net/third_party/quiche/src/spdy/core/hpack/hpack_constants.h"
#include "net/third_party/quiche/src/spdy/core/spdy_bitmasks.h"
#include "net/third_party/quiche/src/spdy/core/spdy_frame_builder.h"
@@ -19,7 +20,6 @@
#include "net/third_party/quiche/src/spdy/platform/api/spdy_bug_tracker.h"
#include "net/third_party/quiche/src/spdy/platform/api/spdy_estimate_memory_usage.h"
#include "net/third_party/quiche/src/spdy/platform/api/spdy_logging.h"
-#include "net/third_party/quiche/src/spdy/platform/api/spdy_ptr_util.h"
#include "net/third_party/quiche/src/spdy/platform/api/spdy_string_utils.h"
namespace spdy {
@@ -414,12 +414,12 @@
switch (frame_ir->frame_type()) {
case SpdyFrameType::HEADERS: {
return std::make_unique<SpdyHeaderFrameIterator>(
- framer,
- SpdyWrapUnique(static_cast<const SpdyHeadersIR*>(frame_ir.release())));
+ framer, quiche::QuicheWrapUnique(
+ static_cast<const SpdyHeadersIR*>(frame_ir.release())));
}
case SpdyFrameType::PUSH_PROMISE: {
return std::make_unique<SpdyPushPromiseFrameIterator>(
- framer, SpdyWrapUnique(
+ framer, quiche::QuicheWrapUnique(
static_cast<const SpdyPushPromiseIR*>(frame_ir.release())));
}
case SpdyFrameType::DATA: {
diff --git a/spdy/platform/api/spdy_ptr_util.h b/spdy/platform/api/spdy_ptr_util.h
deleted file mode 100644
index dd77e8e..0000000
--- a/spdy/platform/api/spdy_ptr_util.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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_SPDY_PLATFORM_API_SPDY_PTR_UTIL_H_
-#define QUICHE_SPDY_PLATFORM_API_SPDY_PTR_UTIL_H_
-
-#include <memory>
-#include <utility>
-
-#include "net/spdy/platform/impl/spdy_ptr_util_impl.h"
-
-namespace spdy {
-
-template <typename T>
-std::unique_ptr<T> SpdyWrapUnique(T* ptr) {
- return SpdyWrapUniqueImpl<T>(ptr);
-}
-
-} // namespace spdy
-
-#endif // QUICHE_SPDY_PLATFORM_API_SPDY_PTR_UTIL_H_