Remove SpdyStringPiece; use QuicheStringPiece instead.

gfe-relnote: n/a, no functional change.
PiperOrigin-RevId: 288029999
Change-Id: If83322cadaac9647f246fa8ef18f5ce870995aa3
diff --git a/spdy/core/hpack/hpack_decoder_adapter.cc b/spdy/core/hpack/hpack_decoder_adapter.cc
index b3bce70..fd5a5be 100644
--- a/spdy/core/hpack/hpack_decoder_adapter.cc
+++ b/spdy/core/hpack/hpack_decoder_adapter.cc
@@ -171,7 +171,7 @@
 }
 
 void HpackDecoderAdapter::ListenerAdapter::OnHeaderErrorDetected(
-    SpdyStringPiece error_message) {
+    quiche::QuicheStringPiece error_message) {
   SPDY_VLOG(1) << error_message;
 }
 
diff --git a/spdy/core/hpack/hpack_decoder_adapter.h b/spdy/core/hpack/hpack_decoder_adapter.h
index cdea661..1d5c7b2 100644
--- a/spdy/core/hpack/hpack_decoder_adapter.h
+++ b/spdy/core/hpack/hpack_decoder_adapter.h
@@ -18,11 +18,11 @@
 #include "net/third_party/quiche/src/http2/hpack/decoder/hpack_decoder_tables.h"
 #include "net/third_party/quiche/src/http2/hpack/hpack_string.h"
 #include "net/third_party/quiche/src/http2/hpack/http2_hpack_constants.h"
+#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
 #include "net/third_party/quiche/src/spdy/core/hpack/hpack_header_table.h"
 #include "net/third_party/quiche/src/spdy/core/spdy_header_block.h"
 #include "net/third_party/quiche/src/spdy/core/spdy_headers_handler_interface.h"
 #include "net/third_party/quiche/src/spdy/platform/api/spdy_export.h"
-#include "net/third_party/quiche/src/spdy/platform/api/spdy_string_piece.h"
 
 namespace spdy {
 namespace test {
@@ -108,7 +108,8 @@
     void OnHeader(const http2::HpackString& name,
                   const http2::HpackString& value) override;
     void OnHeaderListEnd() override;
-    void OnHeaderErrorDetected(SpdyStringPiece error_message) override;
+    void OnHeaderErrorDetected(
+        quiche::QuicheStringPiece error_message) override;
 
     // Override the HpackDecoderTablesDebugListener methods:
     int64_t OnEntryInserted(const http2::HpackStringPair& entry,
diff --git a/spdy/core/hpack/hpack_decoder_adapter_test.cc b/spdy/core/hpack/hpack_decoder_adapter_test.cc
index 88318fb..f1bfe0c 100644
--- a/spdy/core/hpack/hpack_decoder_adapter_test.cc
+++ b/spdy/core/hpack/hpack_decoder_adapter_test.cc
@@ -65,7 +65,8 @@
   explicit HpackDecoderAdapterPeer(HpackDecoderAdapter* decoder)
       : decoder_(decoder) {}
 
-  void HandleHeaderRepresentation(SpdyStringPiece name, SpdyStringPiece value) {
+  void HandleHeaderRepresentation(quiche::QuicheStringPiece name,
+                                  quiche::QuicheStringPiece value) {
     decoder_->listener_adapter_.OnHeader(HpackString(name), HpackString(value));
   }
 
@@ -132,7 +133,7 @@
     }
   }
 
-  bool HandleControlFrameHeadersData(SpdyStringPiece str) {
+  bool HandleControlFrameHeadersData(quiche::QuicheStringPiece str) {
     SPDY_VLOG(3) << "HandleControlFrameHeadersData:\n" << SpdyHexDump(str);
     bytes_passed_in_ += str.size();
     return decoder_.HandleControlFrameHeadersData(str.data(), str.size());
@@ -146,7 +147,8 @@
     return rc;
   }
 
-  bool DecodeHeaderBlock(SpdyStringPiece str, bool check_decoded_size = true) {
+  bool DecodeHeaderBlock(quiche::QuicheStringPiece str,
+                         bool check_decoded_size = true) {
     // Don't call this again if HandleControlFrameHeadersData failed previously.
     EXPECT_FALSE(decode_has_failed_);
     HandleControlFrameHeadersStart();
@@ -223,7 +225,8 @@
     return size;
   }
 
-  const SpdyHeaderBlock& DecodeBlockExpectingSuccess(SpdyStringPiece str) {
+  const SpdyHeaderBlock& DecodeBlockExpectingSuccess(
+      quiche::QuicheStringPiece str) {
     EXPECT_TRUE(DecodeHeaderBlock(str));
     return decoded_block();
   }
@@ -429,12 +432,13 @@
   // Resulting decoded headers are in the same order as the inputs.
   EXPECT_THAT(
       decoded_block(),
-      ElementsAre(Pair("cookie", " part 1; part 2 ; part3;  fin!"),
-                  Pair("passed-through", SpdyStringPiece("foo\0baz", 7)),
-                  Pair("joined", "not joined"),
-                  Pair("joineD", SpdyStringPiece("value 1\0value 2", 15)),
-                  Pair("empty", ""),
-                  Pair("empty-joined", SpdyStringPiece("\0foo\0\0", 6))));
+      ElementsAre(
+          Pair("cookie", " part 1; part 2 ; part3;  fin!"),
+          Pair("passed-through", quiche::QuicheStringPiece("foo\0baz", 7)),
+          Pair("joined", "not joined"),
+          Pair("joineD", quiche::QuicheStringPiece("value 1\0value 2", 15)),
+          Pair("empty", ""),
+          Pair("empty-joined", quiche::QuicheStringPiece("\0foo\0\0", 6))));
 }
 
 // Decoding indexed static table field should work.
@@ -499,7 +503,7 @@
     output_stream.AppendUint32(126);
 
     output_stream.TakeString(&input);
-    EXPECT_TRUE(DecodeHeaderBlock(SpdyStringPiece(input)));
+    EXPECT_TRUE(DecodeHeaderBlock(quiche::QuicheStringPiece(input)));
     EXPECT_EQ(126u, decoder_peer_.header_table_size_limit());
   }
   {
@@ -509,7 +513,7 @@
     output_stream.AppendUint32(kDefaultHeaderTableSizeSetting);
 
     output_stream.TakeString(&input);
-    EXPECT_TRUE(DecodeHeaderBlock(SpdyStringPiece(input)));
+    EXPECT_TRUE(DecodeHeaderBlock(quiche::QuicheStringPiece(input)));
     EXPECT_EQ(kDefaultHeaderTableSizeSetting,
               decoder_peer_.header_table_size_limit());
   }
@@ -520,7 +524,7 @@
     output_stream.AppendUint32(kDefaultHeaderTableSizeSetting + 1);
 
     output_stream.TakeString(&input);
-    EXPECT_FALSE(DecodeHeaderBlock(SpdyStringPiece(input)));
+    EXPECT_FALSE(DecodeHeaderBlock(quiche::QuicheStringPiece(input)));
     EXPECT_EQ(kDefaultHeaderTableSizeSetting,
               decoder_peer_.header_table_size_limit());
   }
@@ -538,7 +542,7 @@
     output_stream.AppendUint32(122);
 
     output_stream.TakeString(&input);
-    EXPECT_TRUE(DecodeHeaderBlock(SpdyStringPiece(input)));
+    EXPECT_TRUE(DecodeHeaderBlock(quiche::QuicheStringPiece(input)));
     EXPECT_EQ(122u, decoder_peer_.header_table_size_limit());
   }
 }
@@ -558,7 +562,7 @@
 
     output_stream.TakeString(&input);
 
-    EXPECT_FALSE(DecodeHeaderBlock(SpdyStringPiece(input)));
+    EXPECT_FALSE(DecodeHeaderBlock(quiche::QuicheStringPiece(input)));
     EXPECT_EQ(10u, decoder_peer_.header_table_size_limit());
   }
 }
@@ -577,7 +581,7 @@
 
     output_stream.TakeString(&input);
 
-    EXPECT_FALSE(DecodeHeaderBlock(SpdyStringPiece(input)));
+    EXPECT_FALSE(DecodeHeaderBlock(quiche::QuicheStringPiece(input)));
     EXPECT_EQ(kDefaultHeaderTableSizeSetting,
               decoder_peer_.header_table_size_limit());
   }
@@ -600,7 +604,7 @@
 
     output_stream.TakeString(&input);
 
-    EXPECT_FALSE(DecodeHeaderBlock(SpdyStringPiece(input)));
+    EXPECT_FALSE(DecodeHeaderBlock(quiche::QuicheStringPiece(input)));
     EXPECT_EQ(60u, decoder_peer_.header_table_size_limit());
   }
 }
@@ -612,7 +616,7 @@
   // name.
   const char input[] = "\x04\x0c/sample/path\x00\x06:path2\x0e/sample/path/2";
   const SpdyHeaderBlock& header_set = DecodeBlockExpectingSuccess(
-      SpdyStringPiece(input, QUICHE_ARRAYSIZE(input) - 1));
+      quiche::QuicheStringPiece(input, QUICHE_ARRAYSIZE(input) - 1));
 
   SpdyHeaderBlock expected_header_set;
   expected_header_set[":path"] = "/sample/path";
@@ -625,7 +629,7 @@
 TEST_P(HpackDecoderAdapterTest, LiteralHeaderIncrementalIndexing) {
   const char input[] = "\x44\x0c/sample/path\x40\x06:path2\x0e/sample/path/2";
   const SpdyHeaderBlock& header_set = DecodeBlockExpectingSuccess(
-      SpdyStringPiece(input, QUICHE_ARRAYSIZE(input) - 1));
+      quiche::QuicheStringPiece(input, QUICHE_ARRAYSIZE(input) - 1));
 
   SpdyHeaderBlock expected_header_set;
   expected_header_set[":path"] = "/sample/path";
@@ -638,23 +642,23 @@
   EXPECT_TRUE(EncodeAndDecodeDynamicTableSizeUpdates(0, 0));
 
   // Name is the last static index. Works.
-  EXPECT_TRUE(DecodeHeaderBlock(SpdyStringPiece("\x7d\x03ooo")));
+  EXPECT_TRUE(DecodeHeaderBlock(quiche::QuicheStringPiece("\x7d\x03ooo")));
   // Name is one beyond the last static index. Fails.
-  EXPECT_FALSE(DecodeHeaderBlock(SpdyStringPiece("\x7e\x03ooo")));
+  EXPECT_FALSE(DecodeHeaderBlock(quiche::QuicheStringPiece("\x7e\x03ooo")));
 }
 
 TEST_P(HpackDecoderAdapterTest, LiteralHeaderNoIndexingInvalidNameIndex) {
   // Name is the last static index. Works.
-  EXPECT_TRUE(DecodeHeaderBlock(SpdyStringPiece("\x0f\x2e\x03ooo")));
+  EXPECT_TRUE(DecodeHeaderBlock(quiche::QuicheStringPiece("\x0f\x2e\x03ooo")));
   // Name is one beyond the last static index. Fails.
-  EXPECT_FALSE(DecodeHeaderBlock(SpdyStringPiece("\x0f\x2f\x03ooo")));
+  EXPECT_FALSE(DecodeHeaderBlock(quiche::QuicheStringPiece("\x0f\x2f\x03ooo")));
 }
 
 TEST_P(HpackDecoderAdapterTest, LiteralHeaderNeverIndexedInvalidNameIndex) {
   // Name is the last static index. Works.
-  EXPECT_TRUE(DecodeHeaderBlock(SpdyStringPiece("\x1f\x2e\x03ooo")));
+  EXPECT_TRUE(DecodeHeaderBlock(quiche::QuicheStringPiece("\x1f\x2e\x03ooo")));
   // Name is one beyond the last static index. Fails.
-  EXPECT_FALSE(DecodeHeaderBlock(SpdyStringPiece("\x1f\x2f\x03ooo")));
+  EXPECT_FALSE(DecodeHeaderBlock(quiche::QuicheStringPiece("\x1f\x2f\x03ooo")));
 }
 
 TEST_P(HpackDecoderAdapterTest, TruncatedIndex) {
@@ -1051,10 +1055,10 @@
   hbb.AppendDynamicTableSizeUpdate(0);
   hbb.AppendDynamicTableSizeUpdate(63);
 
-  const SpdyStringPiece name("some-name");
-  const SpdyStringPiece value1("some-value");
-  const SpdyStringPiece value2("another-value");
-  const SpdyStringPiece value3("yet-another-value");
+  const quiche::QuicheStringPiece name("some-name");
+  const quiche::QuicheStringPiece value1("some-value");
+  const quiche::QuicheStringPiece value2("another-value");
+  const quiche::QuicheStringPiece value3("yet-another-value");
 
   // Add an entry that will become the first in the dynamic table, entry 62.
   hbb.AppendLiteralNameAndValue(HpackEntryType::kIndexedLiteralHeader, false,
diff --git a/spdy/core/hpack/hpack_encoder.cc b/spdy/core/hpack/hpack_encoder.cc
index 368754e..3835047 100644
--- a/spdy/core/hpack/hpack_encoder.cc
+++ b/spdy/core/hpack/hpack_encoder.cc
@@ -56,10 +56,12 @@
 namespace {
 
 // The default header listener.
-void NoOpListener(SpdyStringPiece /*name*/, SpdyStringPiece /*value*/) {}
+void NoOpListener(quiche::QuicheStringPiece /*name*/,
+                  quiche::QuicheStringPiece /*value*/) {}
 
 // The default HPACK indexing policy.
-bool DefaultPolicy(SpdyStringPiece name, SpdyStringPiece /* value */) {
+bool DefaultPolicy(quiche::QuicheStringPiece name,
+                   quiche::QuicheStringPiece /* value */) {
   if (name.empty()) {
     return false;
   }
@@ -188,7 +190,7 @@
   EmitString(representation.second);
 }
 
-void HpackEncoder::EmitString(SpdyStringPiece str) {
+void HpackEncoder::EmitString(quiche::QuicheStringPiece str) {
   size_t encoded_size =
       enable_compression_ ? huffman_table_.EncodedSize(str) : str.size();
   if (encoded_size < str.size()) {
@@ -229,19 +231,21 @@
   // See Section 8.1.2.5. "Compressing the Cookie Header Field" in the HTTP/2
   // specification at https://tools.ietf.org/html/draft-ietf-httpbis-http2-14.
   // Cookie values are split into individually-encoded HPACK representations.
-  SpdyStringPiece cookie_value = cookie.second;
+  quiche::QuicheStringPiece cookie_value = cookie.second;
   // Consume leading and trailing whitespace if present.
-  SpdyStringPiece::size_type first = cookie_value.find_first_not_of(" \t");
-  SpdyStringPiece::size_type last = cookie_value.find_last_not_of(" \t");
-  if (first == SpdyStringPiece::npos) {
-    cookie_value = SpdyStringPiece();
+  quiche::QuicheStringPiece::size_type first =
+      cookie_value.find_first_not_of(" \t");
+  quiche::QuicheStringPiece::size_type last =
+      cookie_value.find_last_not_of(" \t");
+  if (first == quiche::QuicheStringPiece::npos) {
+    cookie_value = quiche::QuicheStringPiece();
   } else {
     cookie_value = cookie_value.substr(first, (last - first) + 1);
   }
   for (size_t pos = 0;;) {
     size_t end = cookie_value.find(";", pos);
 
-    if (end == SpdyStringPiece::npos) {
+    if (end == quiche::QuicheStringPiece::npos) {
       out->push_back(std::make_pair(cookie.first, cookie_value.substr(pos)));
       break;
     }
@@ -261,12 +265,12 @@
                                            Representations* out) {
   size_t pos = 0;
   size_t end = 0;
-  while (end != SpdyStringPiece::npos) {
+  while (end != quiche::QuicheStringPiece::npos) {
     end = header_field.second.find('\0', pos);
     out->push_back(std::make_pair(
         header_field.first,
         header_field.second.substr(
-            pos, end == SpdyStringPiece::npos ? end : end - pos)));
+            pos, end == quiche::QuicheStringPiece::npos ? end : end - pos)));
     pos = end + 1;
   }
 }
diff --git a/spdy/core/hpack/hpack_encoder.h b/spdy/core/hpack/hpack_encoder.h
index 03c9d92..115908b 100644
--- a/spdy/core/hpack/hpack_encoder.h
+++ b/spdy/core/hpack/hpack_encoder.h
@@ -14,11 +14,11 @@
 #include <utility>
 #include <vector>
 
+#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
 #include "net/third_party/quiche/src/spdy/core/hpack/hpack_header_table.h"
 #include "net/third_party/quiche/src/spdy/core/hpack/hpack_output_stream.h"
 #include "net/third_party/quiche/src/spdy/core/spdy_protocol.h"
 #include "net/third_party/quiche/src/spdy/platform/api/spdy_export.h"
-#include "net/third_party/quiche/src/spdy/platform/api/spdy_string_piece.h"
 
 // An HpackEncoder encodes header sets as outlined in
 // http://tools.ietf.org/html/rfc7541.
@@ -33,16 +33,19 @@
 
 class SPDY_EXPORT_PRIVATE HpackEncoder {
  public:
-  using Representation = std::pair<SpdyStringPiece, SpdyStringPiece>;
+  using Representation =
+      std::pair<quiche::QuicheStringPiece, quiche::QuicheStringPiece>;
   using Representations = std::vector<Representation>;
 
   // Callers may provide a HeaderListener to be informed of header name-value
   // pairs processed by this encoder.
-  using HeaderListener = std::function<void(SpdyStringPiece, SpdyStringPiece)>;
+  using HeaderListener =
+      std::function<void(quiche::QuicheStringPiece, quiche::QuicheStringPiece)>;
 
   // An indexing policy should return true if the provided header name-value
   // pair should be inserted into the HPACK dynamic table.
-  using IndexingPolicy = std::function<bool(SpdyStringPiece, SpdyStringPiece)>;
+  using IndexingPolicy =
+      std::function<bool(quiche::QuicheStringPiece, quiche::QuicheStringPiece)>;
 
   // |table| is an initialized HPACK Huffman table, having an
   // externally-managed lifetime which spans beyond HpackEncoder.
@@ -123,7 +126,7 @@
   void EmitLiteral(const Representation& representation);
 
   // Emits a Huffman or identity string (whichever is smaller).
-  void EmitString(SpdyStringPiece str);
+  void EmitString(quiche::QuicheStringPiece str);
 
   // Emits the current dynamic table size if the table size was recently
   // updated and we have not yet emitted it (Section 6.3).
diff --git a/spdy/core/hpack/hpack_encoder_test.cc b/spdy/core/hpack/hpack_encoder_test.cc
index b905214..a96ff69 100644
--- a/spdy/core/hpack/hpack_encoder_test.cc
+++ b/spdy/core/hpack/hpack_encoder_test.cc
@@ -41,12 +41,12 @@
   const HpackHuffmanTable& huffman_table() const {
     return encoder_->huffman_table_;
   }
-  void EmitString(SpdyStringPiece str) { encoder_->EmitString(str); }
+  void EmitString(quiche::QuicheStringPiece str) { encoder_->EmitString(str); }
   void TakeString(std::string* out) {
     encoder_->output_stream_.TakeString(out);
   }
-  static void CookieToCrumbs(SpdyStringPiece cookie,
-                             std::vector<SpdyStringPiece>* out) {
+  static void CookieToCrumbs(quiche::QuicheStringPiece cookie,
+                             std::vector<quiche::QuicheStringPiece>* out) {
     Representations tmp;
     HpackEncoder::CookieToCrumbs(std::make_pair("", cookie), &tmp);
 
@@ -55,8 +55,9 @@
       out->push_back(tmp[i].second);
     }
   }
-  static void DecomposeRepresentation(SpdyStringPiece value,
-                                      std::vector<SpdyStringPiece>* out) {
+  static void DecomposeRepresentation(
+      quiche::QuicheStringPiece value,
+      std::vector<quiche::QuicheStringPiece>* out) {
     Representations tmp;
     HpackEncoder::DecomposeRepresentation(std::make_pair("foobar", value),
                                           &tmp);
@@ -148,11 +149,12 @@
     peer_.table()->SetMaxSize(peer_.table()->size());
   }
 
-  void SaveHeaders(SpdyStringPiece name, SpdyStringPiece value) {
-    SpdyStringPiece n(headers_storage_.Memdup(name.data(), name.size()),
-                      name.size());
-    SpdyStringPiece v(headers_storage_.Memdup(value.data(), value.size()),
-                      value.size());
+  void SaveHeaders(quiche::QuicheStringPiece name,
+                   quiche::QuicheStringPiece value) {
+    quiche::QuicheStringPiece n(
+        headers_storage_.Memdup(name.data(), name.size()), name.size());
+    quiche::QuicheStringPiece v(
+        headers_storage_.Memdup(value.data(), value.size()), value.size());
     headers_observed_.push_back(std::make_pair(n, v));
   }
 
@@ -161,24 +163,26 @@
     expected_.AppendUint32(index);
   }
   void ExpectIndexedLiteral(const HpackEntry* key_entry,
-                            SpdyStringPiece value) {
+                            quiche::QuicheStringPiece value) {
     expected_.AppendPrefix(kLiteralIncrementalIndexOpcode);
     expected_.AppendUint32(IndexOf(key_entry));
     ExpectString(&expected_, value);
   }
-  void ExpectIndexedLiteral(SpdyStringPiece name, SpdyStringPiece value) {
+  void ExpectIndexedLiteral(quiche::QuicheStringPiece name,
+                            quiche::QuicheStringPiece value) {
     expected_.AppendPrefix(kLiteralIncrementalIndexOpcode);
     expected_.AppendUint32(0);
     ExpectString(&expected_, name);
     ExpectString(&expected_, value);
   }
-  void ExpectNonIndexedLiteral(SpdyStringPiece name, SpdyStringPiece value) {
+  void ExpectNonIndexedLiteral(quiche::QuicheStringPiece name,
+                               quiche::QuicheStringPiece value) {
     expected_.AppendPrefix(kLiteralNoIndexOpcode);
     expected_.AppendUint32(0);
     ExpectString(&expected_, name);
     ExpectString(&expected_, value);
   }
-  void ExpectString(HpackOutputStream* stream, SpdyStringPiece str) {
+  void ExpectString(HpackOutputStream* stream, quiche::QuicheStringPiece str) {
     const HpackHuffmanTable& huffman_table = peer_.huffman_table();
     size_t encoded_size = peer_.compression_enabled()
                               ? huffman_table.EncodedSize(str)
@@ -244,7 +248,8 @@
   const HpackEntry* cookie_c_;
 
   SpdySimpleArena headers_storage_;
-  std::vector<std::pair<SpdyStringPiece, SpdyStringPiece>> headers_observed_;
+  std::vector<std::pair<quiche::QuicheStringPiece, quiche::QuicheStringPiece>>
+      headers_observed_;
 
   HpackOutputStream expected_;
   EncodeStrategy strategy_ = kDefault;
@@ -252,15 +257,16 @@
 
 TEST_F(HpackEncoderTestBase, EncodeRepresentations) {
   encoder_.SetHeaderListener(
-      [this](SpdyStringPiece name, SpdyStringPiece value) {
+      [this](quiche::QuicheStringPiece name, quiche::QuicheStringPiece value) {
         this->SaveHeaders(name, value);
       });
-  const std::vector<std::pair<SpdyStringPiece, SpdyStringPiece>> header_list = {
-      {"cookie", "val1; val2;val3"},
-      {":path", "/home"},
-      {"accept", "text/html, text/plain,application/xml"},
-      {"cookie", "val4"},
-      {"withnul", SpdyStringPiece("one\0two", 7)}};
+  const std::vector<
+      std::pair<quiche::QuicheStringPiece, quiche::QuicheStringPiece>>
+      header_list = {{"cookie", "val1; val2;val3"},
+                     {":path", "/home"},
+                     {"accept", "text/html, text/plain,application/xml"},
+                     {"cookie", "val4"},
+                     {"withnul", quiche::QuicheStringPiece("one\0two", 7)}};
   ExpectNonIndexedLiteral(":path", "/home");
   ExpectIndexedLiteral(peer_.table()->GetByName("cookie"), "val1");
   ExpectIndexedLiteral(peer_.table()->GetByName("cookie"), "val2");
@@ -268,7 +274,7 @@
   ExpectIndexedLiteral(peer_.table()->GetByName("accept"),
                        "text/html, text/plain,application/xml");
   ExpectIndexedLiteral(peer_.table()->GetByName("cookie"), "val4");
-  ExpectIndexedLiteral("withnul", SpdyStringPiece("one\0two", 7));
+  ExpectIndexedLiteral("withnul", quiche::QuicheStringPiece("one\0two", 7));
 
   CompareWithExpectedEncoding(header_list);
   EXPECT_THAT(
@@ -277,7 +283,7 @@
                   Pair("cookie", "val2"), Pair("cookie", "val3"),
                   Pair("accept", "text/html, text/plain,application/xml"),
                   Pair("cookie", "val4"),
-                  Pair("withnul", SpdyStringPiece("one\0two", 7))));
+                  Pair("withnul", quiche::QuicheStringPiece("one\0two", 7))));
 }
 
 class HpackEncoderTest : public HpackEncoderTestBase,
@@ -297,7 +303,7 @@
 
 TEST_P(HpackEncoderTest, SingleDynamicIndex) {
   encoder_.SetHeaderListener(
-      [this](SpdyStringPiece name, SpdyStringPiece value) {
+      [this](quiche::QuicheStringPiece name, quiche::QuicheStringPiece value) {
         this->SaveHeaders(name, value);
       });
 
@@ -418,7 +424,7 @@
 
 TEST_P(HpackEncoderTest, EncodingWithoutCompression) {
   encoder_.SetHeaderListener(
-      [this](SpdyStringPiece name, SpdyStringPiece value) {
+      [this](quiche::QuicheStringPiece name, quiche::QuicheStringPiece value) {
         this->SaveHeaders(name, value);
       });
   encoder_.DisableCompression();
@@ -446,10 +452,11 @@
   if (strategy_ == kRepresentations) {
     EXPECT_THAT(
         headers_observed_,
-        ElementsAre(Pair(":path", "/index.html"), Pair("cookie", "foo=bar"),
-                    Pair("cookie", "baz=bing"),
-                    Pair("hello", SpdyStringPiece("goodbye\0aloha", 13)),
-                    Pair("multivalue", "value1, value2")));
+        ElementsAre(
+            Pair(":path", "/index.html"), Pair("cookie", "foo=bar"),
+            Pair("cookie", "baz=bing"),
+            Pair("hello", quiche::QuicheStringPiece("goodbye\0aloha", 13)),
+            Pair("multivalue", "value1, value2")));
   } else {
     EXPECT_THAT(
         headers_observed_,
@@ -462,7 +469,7 @@
 
 TEST_P(HpackEncoderTest, MultipleEncodingPasses) {
   encoder_.SetHeaderListener(
-      [this](SpdyStringPiece name, SpdyStringPiece value) {
+      [this](quiche::QuicheStringPiece name, quiche::QuicheStringPiece value) {
         this->SaveHeaders(name, value);
       });
 
@@ -558,7 +565,7 @@
 
 TEST_P(HpackEncoderTest, CookieToCrumbs) {
   test::HpackEncoderPeer peer(nullptr);
-  std::vector<SpdyStringPiece> out;
+  std::vector<quiche::QuicheStringPiece> out;
 
   // Leading and trailing whitespace is consumed. A space after ';' is consumed.
   // All other spaces remain. ';' at beginning and end of string produce empty
@@ -592,7 +599,7 @@
 
 TEST_P(HpackEncoderTest, DecomposeRepresentation) {
   test::HpackEncoderPeer peer(nullptr);
-  std::vector<SpdyStringPiece> out;
+  std::vector<quiche::QuicheStringPiece> out;
 
   peer.DecomposeRepresentation("", &out);
   EXPECT_THAT(out, ElementsAre(""));
@@ -600,16 +607,19 @@
   peer.DecomposeRepresentation("foobar", &out);
   EXPECT_THAT(out, ElementsAre("foobar"));
 
-  peer.DecomposeRepresentation(SpdyStringPiece("foo\0bar", 7), &out);
+  peer.DecomposeRepresentation(quiche::QuicheStringPiece("foo\0bar", 7), &out);
   EXPECT_THAT(out, ElementsAre("foo", "bar"));
 
-  peer.DecomposeRepresentation(SpdyStringPiece("\0foo\0bar", 8), &out);
+  peer.DecomposeRepresentation(quiche::QuicheStringPiece("\0foo\0bar", 8),
+                               &out);
   EXPECT_THAT(out, ElementsAre("", "foo", "bar"));
 
-  peer.DecomposeRepresentation(SpdyStringPiece("foo\0bar\0", 8), &out);
+  peer.DecomposeRepresentation(quiche::QuicheStringPiece("foo\0bar\0", 8),
+                               &out);
   EXPECT_THAT(out, ElementsAre("foo", "bar", ""));
 
-  peer.DecomposeRepresentation(SpdyStringPiece("\0foo\0bar\0", 9), &out);
+  peer.DecomposeRepresentation(quiche::QuicheStringPiece("\0foo\0bar\0", 9),
+                               &out);
   EXPECT_THAT(out, ElementsAre("", "foo", "bar", ""));
 }
 
diff --git a/spdy/core/hpack/hpack_entry.cc b/spdy/core/hpack/hpack_entry.cc
index 0965739..c96e35c 100644
--- a/spdy/core/hpack/hpack_entry.cc
+++ b/spdy/core/hpack/hpack_entry.cc
@@ -12,8 +12,8 @@
 
 const size_t HpackEntry::kSizeOverhead = 32;
 
-HpackEntry::HpackEntry(SpdyStringPiece name,
-                       SpdyStringPiece value,
+HpackEntry::HpackEntry(quiche::QuicheStringPiece name,
+                       quiche::QuicheStringPiece value,
                        bool is_static,
                        size_t insertion_index)
     : name_(name.data(), name.size()),
@@ -24,7 +24,8 @@
       type_(is_static ? STATIC : DYNAMIC),
       time_added_(0) {}
 
-HpackEntry::HpackEntry(SpdyStringPiece name, SpdyStringPiece value)
+HpackEntry::HpackEntry(quiche::QuicheStringPiece name,
+                       quiche::QuicheStringPiece value)
     : name_ref_(name),
       value_ref_(value),
       insertion_index_(0),
@@ -43,8 +44,8 @@
   } else {
     name_ = other.name_;
     value_ = other.value_;
-    name_ref_ = SpdyStringPiece(name_.data(), name_.size());
-    value_ref_ = SpdyStringPiece(value_.data(), value_.size());
+    name_ref_ = quiche::QuicheStringPiece(name_.data(), name_.size());
+    value_ref_ = quiche::QuicheStringPiece(value_.data(), value_.size());
   }
 }
 
@@ -60,15 +61,16 @@
   }
   name_ = other.name_;
   value_ = other.value_;
-  name_ref_ = SpdyStringPiece(name_.data(), name_.size());
-  value_ref_ = SpdyStringPiece(value_.data(), value_.size());
+  name_ref_ = quiche::QuicheStringPiece(name_.data(), name_.size());
+  value_ref_ = quiche::QuicheStringPiece(value_.data(), value_.size());
   return *this;
 }
 
 HpackEntry::~HpackEntry() = default;
 
 // static
-size_t HpackEntry::Size(SpdyStringPiece name, SpdyStringPiece value) {
+size_t HpackEntry::Size(quiche::QuicheStringPiece name,
+                        quiche::QuicheStringPiece value) {
   return name.size() + value.size() + kSizeOverhead;
 }
 size_t HpackEntry::Size() const {
diff --git a/spdy/core/hpack/hpack_entry.h b/spdy/core/hpack/hpack_entry.h
index 50ac3a7..d36bce4 100644
--- a/spdy/core/hpack/hpack_entry.h
+++ b/spdy/core/hpack/hpack_entry.h
@@ -9,8 +9,8 @@
 #include <cstdint>
 #include <string>
 
+#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
 #include "net/third_party/quiche/src/spdy/platform/api/spdy_export.h"
-#include "net/third_party/quiche/src/spdy/platform/api/spdy_string_piece.h"
 
 // All section references below are to
 // http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-08
@@ -34,15 +34,15 @@
   // The combination of |is_static| and |insertion_index| allows an
   // HpackEntryTable to determine the index of an HpackEntry in O(1) time.
   // Copies |name| and |value|.
-  HpackEntry(SpdyStringPiece name,
-             SpdyStringPiece value,
+  HpackEntry(quiche::QuicheStringPiece name,
+             quiche::QuicheStringPiece value,
              bool is_static,
              size_t insertion_index);
 
   // Create a 'lookup' entry (only) suitable for querying a HpackEntrySet. The
   // instance InsertionIndex() always returns 0 and IsLookup() returns true.
   // The memory backing |name| and |value| must outlive this object.
-  HpackEntry(SpdyStringPiece name, SpdyStringPiece value);
+  HpackEntry(quiche::QuicheStringPiece name, quiche::QuicheStringPiece value);
 
   HpackEntry(const HpackEntry& other);
   HpackEntry& operator=(const HpackEntry& other);
@@ -53,8 +53,8 @@
 
   ~HpackEntry();
 
-  SpdyStringPiece name() const { return name_ref_; }
-  SpdyStringPiece value() const { return value_ref_; }
+  quiche::QuicheStringPiece name() const { return name_ref_; }
+  quiche::QuicheStringPiece value() const { return value_ref_; }
 
   // Returns whether this entry is a member of the static (as opposed to
   // dynamic) table.
@@ -67,7 +67,8 @@
   size_t InsertionIndex() const { return insertion_index_; }
 
   // Returns the size of an entry as defined in 5.1.
-  static size_t Size(SpdyStringPiece name, SpdyStringPiece value);
+  static size_t Size(quiche::QuicheStringPiece name,
+                     quiche::QuicheStringPiece value);
   size_t Size() const;
 
   std::string GetDebugString() const;
@@ -91,8 +92,8 @@
 
   // These members are always valid. For DYNAMIC and STATIC entries, they
   // always point to |name_| and |value_|.
-  SpdyStringPiece name_ref_;
-  SpdyStringPiece value_ref_;
+  quiche::QuicheStringPiece name_ref_;
+  quiche::QuicheStringPiece value_ref_;
 
   // The entry's index in the total set of entries ever inserted into the header
   // table.
diff --git a/spdy/core/hpack/hpack_header_table.cc b/spdy/core/hpack/hpack_header_table.cc
index 17f91cd..67a0a5f 100644
--- a/spdy/core/hpack/hpack_header_table.cc
+++ b/spdy/core/hpack/hpack_header_table.cc
@@ -16,7 +16,7 @@
 
 size_t HpackHeaderTable::EntryHasher::operator()(
     const HpackEntry* entry) const {
-  return SpdyHashStringPair(entry->name(), entry->value());
+  return quiche::QuicheHashStringPair(entry->name(), entry->value());
 }
 
 bool HpackHeaderTable::EntriesEq::operator()(const HpackEntry* lhs,
@@ -60,7 +60,7 @@
   return nullptr;
 }
 
-const HpackEntry* HpackHeaderTable::GetByName(SpdyStringPiece name) {
+const HpackEntry* HpackHeaderTable::GetByName(quiche::QuicheStringPiece name) {
   {
     auto it = static_name_index_.find(name);
     if (it != static_name_index_.end()) {
@@ -80,8 +80,9 @@
   return nullptr;
 }
 
-const HpackEntry* HpackHeaderTable::GetByNameAndValue(SpdyStringPiece name,
-                                                      SpdyStringPiece value) {
+const HpackEntry* HpackHeaderTable::GetByNameAndValue(
+    quiche::QuicheStringPiece name,
+    quiche::QuicheStringPiece value) {
   HpackEntry query(name, value);
   {
     auto it = static_index_.find(&query);
@@ -127,8 +128,8 @@
   SetMaxSize(settings_size_bound_);
 }
 
-void HpackHeaderTable::EvictionSet(SpdyStringPiece name,
-                                   SpdyStringPiece value,
+void HpackHeaderTable::EvictionSet(quiche::QuicheStringPiece name,
+                                   quiche::QuicheStringPiece value,
                                    EntryTable::iterator* begin_out,
                                    EntryTable::iterator* end_out) {
   size_t eviction_count = EvictionCountForEntry(name, value);
@@ -136,8 +137,9 @@
   *end_out = dynamic_entries_.end();
 }
 
-size_t HpackHeaderTable::EvictionCountForEntry(SpdyStringPiece name,
-                                               SpdyStringPiece value) const {
+size_t HpackHeaderTable::EvictionCountForEntry(
+    quiche::QuicheStringPiece name,
+    quiche::QuicheStringPiece value) const {
   size_t available_size = max_size_ - size_;
   size_t entry_size = HpackEntry::Size(name, value);
 
@@ -183,8 +185,9 @@
   }
 }
 
-const HpackEntry* HpackHeaderTable::TryAddEntry(SpdyStringPiece name,
-                                                SpdyStringPiece value) {
+const HpackEntry* HpackHeaderTable::TryAddEntry(
+    quiche::QuicheStringPiece name,
+    quiche::QuicheStringPiece value) {
   Evict(EvictionCountForEntry(name, value));
 
   size_t entry_size = HpackEntry::Size(name, value);
diff --git a/spdy/core/hpack/hpack_header_table.h b/spdy/core/hpack/hpack_header_table.h
index 7ff49f3..3f532ac 100644
--- a/spdy/core/hpack/hpack_header_table.h
+++ b/spdy/core/hpack/hpack_header_table.h
@@ -10,11 +10,11 @@
 #include <deque>
 #include <memory>
 
+#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
 #include "net/third_party/quiche/src/spdy/core/hpack/hpack_entry.h"
 #include "net/third_party/quiche/src/spdy/platform/api/spdy_containers.h"
 #include "net/third_party/quiche/src/spdy/platform/api/spdy_export.h"
 #include "net/third_party/quiche/src/spdy/platform/api/spdy_macros.h"
-#include "net/third_party/quiche/src/spdy/platform/api/spdy_string_piece.h"
 
 // All section references below are to http://tools.ietf.org/html/rfc7541.
 
@@ -67,8 +67,9 @@
     bool operator()(const HpackEntry* lhs, const HpackEntry* rhs) const;
   };
   using UnorderedEntrySet = SpdyHashSet<HpackEntry*, EntryHasher, EntriesEq>;
-  using NameToEntryMap =
-      SpdyHashMap<SpdyStringPiece, const HpackEntry*, SpdyStringPieceHash>;
+  using NameToEntryMap = SpdyHashMap<quiche::QuicheStringPiece,
+                                     const HpackEntry*,
+                                     quiche::QuicheStringPieceHash>;
 
   HpackHeaderTable();
   HpackHeaderTable(const HpackHeaderTable&) = delete;
@@ -88,11 +89,11 @@
   const HpackEntry* GetByIndex(size_t index);
 
   // Returns the lowest-value entry having |name|, or NULL.
-  const HpackEntry* GetByName(SpdyStringPiece name);
+  const HpackEntry* GetByName(quiche::QuicheStringPiece name);
 
   // Returns the lowest-index matching entry, or NULL.
-  const HpackEntry* GetByNameAndValue(SpdyStringPiece name,
-                                      SpdyStringPiece value);
+  const HpackEntry* GetByNameAndValue(quiche::QuicheStringPiece name,
+                                      quiche::QuicheStringPiece value);
 
   // Returns the index of an entry within this header table.
   size_t IndexOf(const HpackEntry* entry) const;
@@ -108,8 +109,8 @@
   // Determine the set of entries which would be evicted by the insertion
   // of |name| & |value| into the table, as per section 4.4. No eviction
   // actually occurs. The set is returned via range [begin_out, end_out).
-  void EvictionSet(SpdyStringPiece name,
-                   SpdyStringPiece value,
+  void EvictionSet(quiche::QuicheStringPiece name,
+                   quiche::QuicheStringPiece value,
                    EntryTable::iterator* begin_out,
                    EntryTable::iterator* end_out);
 
@@ -117,7 +118,8 @@
   // and |value| must not be owned by an entry which could be evicted. The
   // added HpackEntry is returned, or NULL is returned if all entries were
   // evicted and the empty table is of insufficent size for the representation.
-  const HpackEntry* TryAddEntry(SpdyStringPiece name, SpdyStringPiece value);
+  const HpackEntry* TryAddEntry(quiche::QuicheStringPiece name,
+                                quiche::QuicheStringPiece value);
 
   void DebugLogTableState() const SPDY_UNUSED;
 
@@ -130,8 +132,8 @@
 
  private:
   // Returns number of evictions required to enter |name| & |value|.
-  size_t EvictionCountForEntry(SpdyStringPiece name,
-                               SpdyStringPiece value) const;
+  size_t EvictionCountForEntry(quiche::QuicheStringPiece name,
+                               quiche::QuicheStringPiece value) const;
 
   // Returns number of evictions required to reclaim |reclaim_size| table size.
   size_t EvictionCountToReclaim(size_t reclaim_size) const;
diff --git a/spdy/core/hpack/hpack_header_table_test.cc b/spdy/core/hpack/hpack_header_table_test.cc
index a7d2482..4f77587 100644
--- a/spdy/core/hpack/hpack_header_table_test.cc
+++ b/spdy/core/hpack/hpack_header_table_test.cc
@@ -33,8 +33,8 @@
   size_t index_size() {
     return table_->static_index_.size() + table_->dynamic_index_.size();
   }
-  std::vector<HpackEntry*> EvictionSet(SpdyStringPiece name,
-                                       SpdyStringPiece value) {
+  std::vector<HpackEntry*> EvictionSet(quiche::QuicheStringPiece name,
+                                       quiche::QuicheStringPiece value) {
     HpackHeaderTable::EntryTable::iterator begin, end;
     table_->EvictionSet(name, value, &begin, &end);
     std::vector<HpackEntry*> result;
@@ -45,7 +45,8 @@
   }
   size_t total_insertions() { return table_->total_insertions_; }
   size_t dynamic_entries_count() { return table_->dynamic_entries_.size(); }
-  size_t EvictionCountForEntry(SpdyStringPiece name, SpdyStringPiece value) {
+  size_t EvictionCountForEntry(quiche::QuicheStringPiece name,
+                               quiche::QuicheStringPiece value) {
     return table_->EvictionCountForEntry(name, value);
   }
   size_t EvictionCountToReclaim(size_t reclaim_size) {
@@ -53,7 +54,8 @@
   }
   void Evict(size_t count) { return table_->Evict(count); }
 
-  void AddDynamicEntry(SpdyStringPiece name, SpdyStringPiece value) {
+  void AddDynamicEntry(quiche::QuicheStringPiece name,
+                       quiche::QuicheStringPiece value) {
     table_->dynamic_entries_.push_back(
         HpackEntry(name, value, false, table_->total_insertions_++));
   }
diff --git a/spdy/core/hpack/hpack_huffman_table.cc b/spdy/core/hpack/hpack_huffman_table.cc
index 3c637a4..eb799d0 100644
--- a/spdy/core/hpack/hpack_huffman_table.cc
+++ b/spdy/core/hpack/hpack_huffman_table.cc
@@ -96,7 +96,7 @@
   return !code_by_id_.empty();
 }
 
-void HpackHuffmanTable::EncodeString(SpdyStringPiece in,
+void HpackHuffmanTable::EncodeString(quiche::QuicheStringPiece in,
                                      HpackOutputStream* out) const {
   size_t bit_remnant = 0;
   for (size_t i = 0; i != in.size(); i++) {
@@ -129,7 +129,7 @@
   }
 }
 
-size_t HpackHuffmanTable::EncodedSize(SpdyStringPiece in) const {
+size_t HpackHuffmanTable::EncodedSize(quiche::QuicheStringPiece in) const {
   size_t bit_count = 0;
   for (size_t i = 0; i != in.size(); i++) {
     uint16_t symbol_id = static_cast<uint8_t>(in[i]);
diff --git a/spdy/core/hpack/hpack_huffman_table.h b/spdy/core/hpack/hpack_huffman_table.h
index a01c62f..abf8caa 100644
--- a/spdy/core/hpack/hpack_huffman_table.h
+++ b/spdy/core/hpack/hpack_huffman_table.h
@@ -9,9 +9,9 @@
 #include <cstdint>
 #include <vector>
 
+#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
 #include "net/third_party/quiche/src/spdy/core/hpack/hpack_constants.h"
 #include "net/third_party/quiche/src/spdy/platform/api/spdy_export.h"
-#include "net/third_party/quiche/src/spdy/platform/api/spdy_string_piece.h"
 
 namespace spdy {
 
@@ -45,10 +45,10 @@
 
   // Encodes the input string to the output stream using the table's Huffman
   // context.
-  void EncodeString(SpdyStringPiece in, HpackOutputStream* out) const;
+  void EncodeString(quiche::QuicheStringPiece in, HpackOutputStream* out) const;
 
   // Returns the encoded size of the input string.
-  size_t EncodedSize(SpdyStringPiece in) const;
+  size_t EncodedSize(quiche::QuicheStringPiece in) const;
 
   // Returns the estimate of dynamically allocated memory in bytes.
   size_t EstimateMemoryUsage() const;
diff --git a/spdy/core/hpack/hpack_huffman_table_test.cc b/spdy/core/hpack/hpack_huffman_table_test.cc
index bc38f6d..abcebf8 100644
--- a/spdy/core/hpack/hpack_huffman_table_test.cc
+++ b/spdy/core/hpack/hpack_huffman_table_test.cc
@@ -42,7 +42,7 @@
  protected:
   GenericHuffmanTableTest() : table_(), peer_(table_) {}
 
-  std::string EncodeString(SpdyStringPiece input) {
+  std::string EncodeString(quiche::QuicheStringPiece input) {
     std::string result;
     HpackOutputStream output_stream;
     table_.EncodeString(input, &output_stream);
@@ -171,10 +171,12 @@
   EXPECT_EQ(0b10011000, peer_.pad_bits());
 
   char input_storage[] = {2, 3, 2, 7, 4};
-  SpdyStringPiece input(input_storage, QUICHE_ARRAYSIZE(input_storage));
+  quiche::QuicheStringPiece input(input_storage,
+                                  QUICHE_ARRAYSIZE(input_storage));
   // By symbol: (2) 00 (3) 010 (2) 00 (7) 10010 (4) 10000 (6 as pad) 1001100.
   char expect_storage[] = {0b00010001, 0b00101000, 0b01001100};
-  SpdyStringPiece expect(expect_storage, QUICHE_ARRAYSIZE(expect_storage));
+  quiche::QuicheStringPiece expect(expect_storage,
+                                   QUICHE_ARRAYSIZE(expect_storage));
   EXPECT_EQ(expect, EncodeString(input));
 }
 
@@ -256,7 +258,7 @@
   for (size_t i = 0; i != 256; i++) {
     char c = static_cast<char>(i);
     char storage[3] = {c, c, c};
-    SpdyStringPiece input(storage, QUICHE_ARRAYSIZE(storage));
+    quiche::QuicheStringPiece input(storage, QUICHE_ARRAYSIZE(storage));
     std::string buffer_in = EncodeString(input);
     std::string buffer_out;
     DecodeString(buffer_in, &buffer_out);
@@ -270,7 +272,7 @@
     storage[i] = static_cast<char>(i);
     storage[511 - i] = static_cast<char>(i);
   }
-  SpdyStringPiece input(storage, QUICHE_ARRAYSIZE(storage));
+  quiche::QuicheStringPiece input(storage, QUICHE_ARRAYSIZE(storage));
   std::string buffer_in = EncodeString(input);
   std::string buffer_out;
   DecodeString(buffer_in, &buffer_out);
diff --git a/spdy/core/hpack/hpack_output_stream.cc b/spdy/core/hpack/hpack_output_stream.cc
index 4ceaece..5c2dd68 100644
--- a/spdy/core/hpack/hpack_output_stream.cc
+++ b/spdy/core/hpack/hpack_output_stream.cc
@@ -41,7 +41,7 @@
   AppendBits(prefix.bits, prefix.bit_size);
 }
 
-void HpackOutputStream::AppendBytes(SpdyStringPiece buffer) {
+void HpackOutputStream::AppendBytes(quiche::QuicheStringPiece buffer) {
   DCHECK_EQ(bit_offset_, 0u);
   buffer_.append(buffer.data(), buffer.size());
 }
diff --git a/spdy/core/hpack/hpack_output_stream.h b/spdy/core/hpack/hpack_output_stream.h
index 5e65139..9b64554 100644
--- a/spdy/core/hpack/hpack_output_stream.h
+++ b/spdy/core/hpack/hpack_output_stream.h
@@ -9,9 +9,9 @@
 #include <map>
 #include <string>
 
+#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
 #include "net/third_party/quiche/src/spdy/core/hpack/hpack_constants.h"
 #include "net/third_party/quiche/src/spdy/platform/api/spdy_export.h"
-#include "net/third_party/quiche/src/spdy/platform/api/spdy_string_piece.h"
 
 // All section references below are to
 // http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-08
@@ -37,7 +37,7 @@
   void AppendPrefix(HpackPrefix prefix);
 
   // Directly appends |buffer|.
-  void AppendBytes(SpdyStringPiece buffer);
+  void AppendBytes(quiche::QuicheStringPiece buffer);
 
   // Appends the given integer using the representation described in
   // 6.1. If the internal buffer ends on a byte boundary, the prefix
diff --git a/spdy/core/hpack/hpack_static_table.cc b/spdy/core/hpack/hpack_static_table.cc
index eea1d9e..e8b07f1 100644
--- a/spdy/core/hpack/hpack_static_table.cc
+++ b/spdy/core/hpack/hpack_static_table.cc
@@ -4,11 +4,11 @@
 
 #include "net/third_party/quiche/src/spdy/core/hpack/hpack_static_table.h"
 
+#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
 #include "net/third_party/quiche/src/spdy/core/hpack/hpack_constants.h"
 #include "net/third_party/quiche/src/spdy/core/hpack/hpack_entry.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_string_piece.h"
 
 namespace spdy {
 
@@ -24,8 +24,8 @@
   for (const HpackStaticEntry* it = static_entry_table;
        it != static_entry_table + static_entry_count; ++it) {
     static_entries_.push_back(
-        HpackEntry(SpdyStringPiece(it->name, it->name_len),
-                   SpdyStringPiece(it->value, it->value_len),
+        HpackEntry(quiche::QuicheStringPiece(it->name, it->name_len),
+                   quiche::QuicheStringPiece(it->value, it->value_len),
                    true,  // is_static
                    total_insertions));
     HpackEntry* entry = &static_entries_.back();
diff --git a/spdy/core/hpack/hpack_static_table_test.cc b/spdy/core/hpack/hpack_static_table_test.cc
index 3f51955..4cd310f 100644
--- a/spdy/core/hpack/hpack_static_table_test.cc
+++ b/spdy/core/hpack/hpack_static_table_test.cc
@@ -7,8 +7,8 @@
 #include <set>
 #include <vector>
 
+#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
 #include "net/third_party/quiche/src/spdy/core/hpack/hpack_constants.h"
-#include "net/third_party/quiche/src/spdy/platform/api/spdy_string_piece.h"
 #include "net/third_party/quiche/src/spdy/platform/api/spdy_test.h"
 
 namespace spdy {
@@ -39,7 +39,7 @@
 
   HpackHeaderTable::NameToEntryMap static_name_index =
       table_.GetStaticNameIndex();
-  std::set<SpdyStringPiece> names;
+  std::set<quiche::QuicheStringPiece> names;
   for (auto* entry : static_index) {
     names.insert(entry->name());
   }