Remove Http2StringPiece; use QuicheStringPiece instead.
gfe-relnote: n/a, no functional change.
PiperOrigin-RevId: 285412823
Change-Id: I907a65813e890ce153b93fe5f07721efb3ecc195
diff --git a/http2/platform/api/http2_string_piece.h b/http2/platform/api/http2_string_piece.h
deleted file mode 100644
index 92fb3ef..0000000
--- a/http2/platform/api/http2_string_piece.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 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_STRING_PIECE_H_
-#define QUICHE_HTTP2_PLATFORM_API_HTTP2_STRING_PIECE_H_
-
-#include "net/http2/platform/impl/http2_string_piece_impl.h"
-
-namespace http2 {
-
-using Http2StringPiece = Http2StringPieceImpl;
-
-} // namespace http2
-
-#endif // QUICHE_HTTP2_PLATFORM_API_HTTP2_STRING_PIECE_H_
diff --git a/http2/platform/api/http2_string_utils.h b/http2/platform/api/http2_string_utils.h
index 1db9d66..4a4e0b8 100644
--- a/http2/platform/api/http2_string_utils.h
+++ b/http2/platform/api/http2_string_utils.h
@@ -9,8 +9,8 @@
#include <type_traits>
#include <utility>
-#include "net/third_party/quiche/src/http2/platform/api/http2_string_piece.h"
#include "net/http2/platform/impl/http2_string_utils_impl.h"
+#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
namespace http2 {
@@ -33,15 +33,15 @@
return Http2HexEncodeImpl(bytes, size);
}
-inline std::string Http2HexDecode(Http2StringPiece data) {
+inline std::string Http2HexDecode(quiche::QuicheStringPiece data) {
return Http2HexDecodeImpl(data);
}
-inline std::string Http2HexDump(Http2StringPiece data) {
+inline std::string Http2HexDump(quiche::QuicheStringPiece data) {
return Http2HexDumpImpl(data);
}
-inline std::string Http2HexEscape(Http2StringPiece data) {
+inline std::string Http2HexEscape(quiche::QuicheStringPiece data) {
return Http2HexEscapeImpl(data);
}
diff --git a/http2/platform/api/http2_string_utils_test.cc b/http2/platform/api/http2_string_utils_test.cc
index 6ffc4b4..6f04c9c 100644
--- a/http2/platform/api/http2_string_utils_test.cc
+++ b/http2/platform/api/http2_string_utils_test.cc
@@ -7,7 +7,7 @@
#include <cstdint>
#include "testing/gtest/include/gtest/gtest.h"
-#include "net/third_party/quiche/src/http2/platform/api/http2_string_piece.h"
+#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
namespace http2 {
namespace test {
@@ -20,14 +20,14 @@
// Single string-like argument.
const char kFoo[] = "foo";
const std::string string_foo(kFoo);
- const Http2StringPiece stringpiece_foo(string_foo);
+ const quiche::QuicheStringPiece stringpiece_foo(string_foo);
EXPECT_EQ("foo", Http2StrCat(kFoo));
EXPECT_EQ("foo", Http2StrCat(string_foo));
EXPECT_EQ("foo", Http2StrCat(stringpiece_foo));
// Two string-like arguments.
const char kBar[] = "bar";
- const Http2StringPiece stringpiece_bar(kBar);
+ const quiche::QuicheStringPiece stringpiece_bar(kBar);
const std::string string_bar(kBar);
EXPECT_EQ("foobar", Http2StrCat(kFoo, kBar));
EXPECT_EQ("foobar", Http2StrCat(kFoo, string_bar));
@@ -79,7 +79,7 @@
// Single string-like argument.
const char kFoo[] = "foo";
const std::string string_foo(kFoo);
- const Http2StringPiece stringpiece_foo(string_foo);
+ const quiche::QuicheStringPiece stringpiece_foo(string_foo);
Http2StrAppend(&output, kFoo);
EXPECT_EQ("foo", output);
Http2StrAppend(&output, string_foo);
@@ -95,7 +95,7 @@
// Two string-like arguments.
const char kBar[] = "bar";
- const Http2StringPiece stringpiece_bar(kBar);
+ const quiche::QuicheStringPiece stringpiece_bar(kBar);
const std::string string_bar(kBar);
Http2StrAppend(&output, kFoo, kBar);
EXPECT_EQ("foobar", output);