diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-15 12:11:11 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-15 12:11:11 +0000 |
commit | a77fa2dc9cb9a10a31688a1bb24a9101194d51af (patch) | |
tree | 9be37414818cd5be282ec26ee0d0f9b8c186ea29 /net | |
parent | 055d7f268366be957e83bff0dfb2a7f5fcf3f3a7 (diff) | |
download | chromium_src-a77fa2dc9cb9a10a31688a1bb24a9101194d51af.zip chromium_src-a77fa2dc9cb9a10a31688a1bb24a9101194d51af.tar.gz chromium_src-a77fa2dc9cb9a10a31688a1bb24a9101194d51af.tar.bz2 |
base: Get rid of 'using' declaration of StringAppendF.
Update the callers to append base:: in the calls to StringAppendF.
BUG=None
TEST=trybots
Review URL: http://codereview.chromium.org/4974001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_cache_unittest.cc | 6 | ||||
-rw-r--r-- | net/http/http_request_headers.cc | 10 | ||||
-rw-r--r-- | net/http/http_util.cc | 4 | ||||
-rw-r--r-- | net/proxy/proxy_bypass_rules.cc | 4 | ||||
-rw-r--r-- | net/tools/flip_server/balsa_headers.cc | 17 | ||||
-rw-r--r-- | net/tools/hresolv/hresolv.cc | 11 | ||||
-rw-r--r-- | net/url_request/url_request_job_metrics.cc | 2 | ||||
-rw-r--r-- | net/url_request/view_cache_helper.cc | 4 |
8 files changed, 32 insertions, 26 deletions
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc index f71cec9..6ca1da1 100644 --- a/net/http/http_cache_unittest.cc +++ b/net/http/http_cache_unittest.cc @@ -904,8 +904,10 @@ void RangeTransactionServer::RangeHandler(const net::HttpRequestInfo* request, if (!request->extra_headers.HasHeader("If-None-Match") || modified_) { EXPECT_EQ(9, (end - start) % 10); std::string data; - for (int block_start = start; block_start < end; block_start += 10) - StringAppendF(&data, "rg: %02d-%02d ", block_start, block_start + 9); + for (int block_start = start; block_start < end; block_start += 10) { + base::StringAppendF(&data, "rg: %02d-%02d ", + block_start, block_start + 9); + } *response_data = data; if (end - start != 9) { diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc index 9f2eb90..fc2ebcd 100644 --- a/net/http/http_request_headers.cc +++ b/net/http/http_request_headers.cc @@ -160,10 +160,12 @@ std::string HttpRequestHeaders::ToString() const { std::string output; for (HeaderVector::const_iterator it = headers_.begin(); it != headers_.end(); ++it) { - if (!it->value.empty()) - StringAppendF(&output, "%s: %s\r\n", it->key.c_str(), it->value.c_str()); - else - StringAppendF(&output, "%s:\r\n", it->key.c_str()); + if (!it->value.empty()) { + base::StringAppendF(&output, "%s: %s\r\n", + it->key.c_str(), it->value.c_str()); + } else { + base::StringAppendF(&output, "%s:\r\n", it->key.c_str()); + } } output.append("\r\n"); return output; diff --git a/net/http/http_util.cc b/net/http/http_util.cc index a3d1ec5..1f57d70 100644 --- a/net/http/http_util.cc +++ b/net/http/http_util.cc @@ -590,8 +590,8 @@ std::string HttpUtil::GenerateAcceptLanguageHeader( lang_list_with_q = language; } else { DCHECK_LT(qvalue10, 10U); - StringAppendF(&lang_list_with_q, ",%s;q=0.%d", language.c_str(), - qvalue10); + base::StringAppendF(&lang_list_with_q, ",%s;q=0.%d", language.c_str(), + qvalue10); } // It does not make sense to have 'q=0'. if (qvalue10 > kQvalueDecrement10) diff --git a/net/proxy/proxy_bypass_rules.cc b/net/proxy/proxy_bypass_rules.cc index d80e6f1..ce018bf 100644 --- a/net/proxy/proxy_bypass_rules.cc +++ b/net/proxy/proxy_bypass_rules.cc @@ -38,10 +38,10 @@ class HostnamePatternRule : public ProxyBypassRules::Rule { virtual std::string ToString() const { std::string str; if (!optional_scheme_.empty()) - StringAppendF(&str, "%s://", optional_scheme_.c_str()); + base::StringAppendF(&str, "%s://", optional_scheme_.c_str()); str += hostname_pattern_; if (optional_port_ != -1) - StringAppendF(&str, ":%d", optional_port_); + base::StringAppendF(&str, ":%d", optional_port_); return str; } diff --git a/net/tools/flip_server/balsa_headers.cc b/net/tools/flip_server/balsa_headers.cc index dfdbb61..2196cd4 100644 --- a/net/tools/flip_server/balsa_headers.cc +++ b/net/tools/flip_server/balsa_headers.cc @@ -555,22 +555,23 @@ void BalsaHeaders::DumpToString(std::string* str) const { // Then check whether the header is in a partially parsed state. If so, just // dump the raw data. if (balsa_buffer_.can_write_to_contiguous_buffer()) { - StringAppendF(str, "\n<incomplete header len: %d>\n%.*s\n", - buffer_length, buffer_length, OriginalHeaderStreamBegin()); + base::StringAppendF(str, "\n<incomplete header len: %d>\n%.*s\n", + buffer_length, buffer_length, + OriginalHeaderStreamBegin()); return; } // If the header is complete, then just dump them with the logical key value // pair. str->reserve(str->size() + GetSizeForWriteBuffer()); - StringAppendF(str, "\n %.*s\n", - static_cast<int>(firstline.size()), - firstline.data()); + base::StringAppendF(str, "\n %.*s\n", + static_cast<int>(firstline.size()), + firstline.data()); BalsaHeaders::const_header_lines_iterator i = header_lines_begin(); for (; i != header_lines_end(); ++i) { - StringAppendF(str, " %.*s: %.*s\n", - static_cast<int>(i->first.size()), i->first.data(), - static_cast<int>(i->second.size()), i->second.data()); + base::StringAppendF(str, " %.*s: %.*s\n", + static_cast<int>(i->first.size()), i->first.data(), + static_cast<int>(i->second.size()), i->second.data()); } } diff --git a/net/tools/hresolv/hresolv.cc b/net/tools/hresolv/hresolv.cc index b5af4ae..da5c4b0 100644 --- a/net/tools/hresolv/hresolv.cc +++ b/net/tools/hresolv/hresolv.cc @@ -73,7 +73,7 @@ std::string FormatAddrinfoFlags(int ai_flags) { if (!flag_names.empty()) { flag_names += "|"; } - StringAppendF(&flag_names, "0x%x", ai_flags); + base::StringAppendF(&flag_names, "0x%x", ai_flags); } return flag_names; } @@ -161,14 +161,15 @@ std::string FormatAddrinfoDetails(const struct addrinfo& ai, std::string FormatAddressList(const net::AddressList& address_list, const std::string& host) { std::string ret_string; - StringAppendF(&ret_string, "AddressList {\n"); - StringAppendF(&ret_string, " Host: %s\n", host.c_str()); + base::StringAppendF(&ret_string, "AddressList {\n"); + base::StringAppendF(&ret_string, " Host: %s\n", host.c_str()); for (const struct addrinfo* it = address_list.head(); it != NULL; it = it->ai_next) { - StringAppendF(&ret_string, "%s", FormatAddrinfoDetails(*it, " ").c_str()); + base::StringAppendF(&ret_string, "%s", + FormatAddrinfoDetails(*it, " ").c_str()); } - StringAppendF(&ret_string, "}\n"); + base::StringAppendF(&ret_string, "}\n"); return ret_string; } diff --git a/net/url_request/url_request_job_metrics.cc b/net/url_request/url_request_job_metrics.cc index 8e7b70b..fcaac74 100644 --- a/net/url_request/url_request_job_metrics.cc +++ b/net/url_request/url_request_job_metrics.cc @@ -31,7 +31,7 @@ void URLRequestJobMetrics::AppendText(std::wstring* text) { } TimeDelta elapsed = end_time_ - start_time_; - StringAppendF(text, + base::StringAppendF(text, L"; total bytes read = %ld; read calls = %d; time = %lld ms;", static_cast<long>(total_bytes_read_), number_of_read_IO_, elapsed.InMilliseconds()); diff --git a/net/url_request/view_cache_helper.cc b/net/url_request/view_cache_helper.cc index 4a3ad02..531b055 100644 --- a/net/url_request/view_cache_helper.cc +++ b/net/url_request/view_cache_helper.cc @@ -28,7 +28,7 @@ void HexDump(const char *buf, size_t buf_len, std::string* result) { const unsigned char *p; while (buf_len) { - StringAppendF(result, "%08x: ", offset); + base::StringAppendF(result, "%08x: ", offset); offset += kMaxRows; p = (const unsigned char *) buf; @@ -38,7 +38,7 @@ void HexDump(const char *buf, size_t buf_len, std::string* result) { // print hex codes: for (i = 0; i < row_max; ++i) - StringAppendF(result, "%02x ", *p++); + base::StringAppendF(result, "%02x ", *p++); for (i = row_max; i < kMaxRows; ++i) result->append(" "); |