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

Unified Diff: net/spdy/hpack/hpack_output_stream.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_output_stream.h ('k') | net/spdy/hpack/hpack_output_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack/hpack_output_stream.cc
diff --git a/net/spdy/hpack/hpack_output_stream.cc b/net/spdy/hpack/hpack_output_stream.cc
index 86f0f5bfcd825813383f501d96647adfb7fdfd5d..c3673cb27e1501f0a23468590cdaa9cdda581e4d 100644
--- a/net/spdy/hpack/hpack_output_stream.cc
+++ b/net/spdy/hpack/hpack_output_stream.cc
@@ -11,8 +11,6 @@
namespace net {
-using std::string;
-
HpackOutputStream::HpackOutputStream() : bit_offset_(0) {}
HpackOutputStream::~HpackOutputStream() {}
@@ -65,7 +63,7 @@ void HpackOutputStream::AppendUint32(uint32_t I) {
}
}
-void HpackOutputStream::TakeString(string* output) {
+void HpackOutputStream::TakeString(SpdyString* output) {
// This must hold, since all public functions cause the buffer to
// end on a byte boundary.
DCHECK_EQ(bit_offset_, 0u);
@@ -74,10 +72,10 @@ void HpackOutputStream::TakeString(string* output) {
bit_offset_ = 0;
}
-void HpackOutputStream::BoundedTakeString(size_t max_size, string* output) {
+void HpackOutputStream::BoundedTakeString(size_t max_size, SpdyString* output) {
if (buffer_.size() > max_size) {
// Save off overflow bytes to temporary string (causes a copy).
- string overflow(buffer_.data() + max_size, buffer_.size() - max_size);
+ SpdyString overflow(buffer_.data() + max_size, buffer_.size() - max_size);
// Resize buffer down to the given limit.
buffer_.resize(max_size);
« no previous file with comments | « net/spdy/hpack/hpack_output_stream.h ('k') | net/spdy/hpack/hpack_output_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698