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

Unified Diff: net/spdy/spdy_header_block.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/spdy_header_block.h ('k') | net/spdy/spdy_header_block_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_header_block.cc
diff --git a/net/spdy/spdy_header_block.cc b/net/spdy/spdy_header_block.cc
index 9430ef0b85a550b5e2e89feadafb15abb241fc50..1cb7b13b6e8ccd2aa374ef888954d11e248aa8af 100644
--- a/net/spdy/spdy_header_block.cc
+++ b/net/spdy/spdy_header_block.cc
@@ -18,8 +18,6 @@
#include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
#include "net/spdy/platform/api/spdy_string_utils.h"
-using std::string;
-
namespace net {
namespace {
@@ -209,11 +207,11 @@ SpdyHeaderBlock::ValueProxy& SpdyHeaderBlock::ValueProxy::operator=(
return *this;
}
-string SpdyHeaderBlock::ValueProxy::as_string() const {
+SpdyString SpdyHeaderBlock::ValueProxy::as_string() const {
if (lookup_result_ == block_->end()) {
return "";
} else {
- return std::string(lookup_result_->second.value());
+ return SpdyString(lookup_result_->second.value());
}
}
@@ -245,12 +243,12 @@ bool SpdyHeaderBlock::operator!=(const SpdyHeaderBlock& other) const {
return !(operator==(other));
}
-string SpdyHeaderBlock::DebugString() const {
+SpdyString SpdyHeaderBlock::DebugString() const {
if (empty()) {
return "{}";
}
- string output = "\n{\n";
+ SpdyString output = "\n{\n";
for (auto it = begin(); it != end(); ++it) {
SpdyStrAppend(&output, " ", it->first, " ", it->second, "\n");
}
@@ -361,7 +359,7 @@ bool SpdyHeaderBlockFromNetLogParam(
for (base::DictionaryValue::Iterator it(*header_dict); !it.IsAtEnd();
it.Advance()) {
- string value;
+ SpdyString value;
if (!it.value().GetAsString(&value)) {
headers->clear();
return false;
« no previous file with comments | « net/spdy/spdy_header_block.h ('k') | net/spdy/spdy_header_block_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698