Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Unified Diff: net/spdy/hpack/hpack_encoder.cc

Issue 2801603003: Add SpdyString alias for std::string in net/spdy. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/hpack/hpack_encoder.h ('k') | net/spdy/hpack/hpack_encoder_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack/hpack_encoder.cc
diff --git a/net/spdy/hpack/hpack_encoder.cc b/net/spdy/hpack/hpack_encoder.cc
index a9d9df6181e6d985b279b45757e77563e0e14daa..48129d11819e9d5c031f67463c9afab9c176f7d1 100644
--- a/net/spdy/hpack/hpack_encoder.cc
+++ b/net/spdy/hpack/hpack_encoder.cc
@@ -17,8 +17,6 @@
namespace net {
-using std::string;
-
class HpackEncoder::RepresentationIterator {
public:
// |pseudo_headers| and |regular_headers| must outlive the iterator.
@@ -88,13 +86,13 @@ HpackEncoder::HpackEncoder(const HpackHuffmanTable& table)
HpackEncoder::~HpackEncoder() {}
void HpackEncoder::EncodeHeaderSet(const Representations& representations,
- string* output) {
+ SpdyString* output) {
RepresentationIterator iter(representations);
EncodeRepresentations(&iter, output);
}
bool HpackEncoder::EncodeHeaderSet(const SpdyHeaderBlock& header_set,
- string* output) {
+ SpdyString* output) {
// Separate header set into pseudo-headers and regular headers.
Representations pseudo_headers;
Representations regular_headers;
@@ -139,7 +137,7 @@ size_t HpackEncoder::EstimateMemoryUsage() const {
}
void HpackEncoder::EncodeRepresentations(RepresentationIterator* iter,
- string* output) {
+ SpdyString* output) {
MaybeEmitTableSize();
while (iter->HasNext()) {
const auto header = iter->Next();
@@ -298,7 +296,7 @@ class HpackEncoder::Encoderator : public ProgressiveEncoder {
// Encodes up to max_encoded_bytes of the current header block into the
// given output string.
- void Next(size_t max_encoded_bytes, string* output) override;
+ void Next(size_t max_encoded_bytes, SpdyString* output) override;
private:
HpackEncoder* encoder_;
@@ -335,7 +333,8 @@ HpackEncoder::Encoderator::Encoderator(const SpdyHeaderBlock& header_set,
encoder_->MaybeEmitTableSize();
}
-void HpackEncoder::Encoderator::Next(size_t max_encoded_bytes, string* output) {
+void HpackEncoder::Encoderator::Next(size_t max_encoded_bytes,
+ SpdyString* output) {
SPDY_BUG_IF(!has_next_)
<< "Encoderator::Next called with nothing left to encode.";
const bool use_compression = encoder_->enable_compression_;
« no previous file with comments | « net/spdy/hpack/hpack_encoder.h ('k') | net/spdy/hpack/hpack_encoder_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698