summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 22:14:34 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 22:14:34 +0000
commit71ed91106ec950734360353775b8579862ff6524 (patch)
treeaa7ca3b450184a39e2d71a9e07847634e075762e /net/url_request
parent421e6141a78f759837e9caa7a5310fb4aa4465d5 (diff)
downloadchromium_src-71ed91106ec950734360353775b8579862ff6524.zip
chromium_src-71ed91106ec950734360353775b8579862ff6524.tar.gz
chromium_src-71ed91106ec950734360353775b8579862ff6524.tar.bz2
Cleanup: change some |str += StringPrintf(...)| --> |StringAppendF(&str, ...)|.
BUG=none TEST=none Review URL: http://codereview.chromium.org/550030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36421 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r--net/url_request/url_request_view_net_internals_job.cc47
1 files changed, 25 insertions, 22 deletions
diff --git a/net/url_request/url_request_view_net_internals_job.cc b/net/url_request/url_request_view_net_internals_job.cc
index 365c92c..39f7d15 100644
--- a/net/url_request/url_request_view_net_internals_job.cc
+++ b/net/url_request/url_request_view_net_internals_job.cc
@@ -40,11 +40,10 @@ void OutputTextInPre(const std::string& text, std::string* out) {
void DrawCommandButton(const std::string& title,
const std::string& command,
std::string* data) {
- data->append(
- StringPrintf("<input type=\"button\" value=\"%s\" "
- "onclick=\"DoCommand('%s')\" />",
- title.c_str(),
- command.c_str()));
+ StringAppendF(data, "<input type=\"button\" value=\"%s\" "
+ "onclick=\"DoCommand('%s')\" />",
+ title.c_str(),
+ command.c_str());
}
@@ -79,13 +78,15 @@ class SubSection {
url_format->MakeURL(GetFullyQualifiedName()).spec();
// Print the heading.
- out->append(StringPrintf("<div>"
+ StringAppendF(
+ out,
+ "<div>"
"<span class=subsection_title>%s</span> "
"<span class=subsection_name>(<a href='%s'>%s</a>)<span>"
"</div>",
EscapeForHTML(title_).c_str(),
section_url.c_str(),
- EscapeForHTML(section_url).c_str()));
+ EscapeForHTML(section_url).c_str());
out->append("<div class=subsection_body>");
}
@@ -261,15 +262,16 @@ class HostResolverCacheSubSection : public SubSection {
DrawCommandButton("Clear", "clear-hostcache", out);
- out->append(StringPrintf(
- "<ul><li>Size: %" PRIuS "</li>"
- "<li>Capacity: %" PRIuS "</li>"
- "<li>Time to live (ms) for success entries: %" PRId64"</li>"
- "<li>Time to live (ms) for failure entries: %" PRId64"</li></ul>",
- host_cache->size(),
- host_cache->max_entries(),
- host_cache->success_entry_ttl().InMilliseconds(),
- host_cache->failure_entry_ttl().InMilliseconds()));
+ StringAppendF(
+ out,
+ "<ul><li>Size: %" PRIuS "</li>"
+ "<li>Capacity: %" PRIuS "</li>"
+ "<li>Time to live (ms) for success entries: %" PRId64"</li>"
+ "<li>Time to live (ms) for failure entries: %" PRId64"</li></ul>",
+ host_cache->size(),
+ host_cache->max_entries(),
+ host_cache->success_entry_ttl().InMilliseconds(),
+ host_cache->failure_entry_ttl().InMilliseconds());
out->append("<table border=1>"
"<tr>"
@@ -320,12 +322,13 @@ class HostResolverCacheSubSection : public SubSection {
}
}
- out->append(StringPrintf("<td>%s</td><td>%s</td><td>%s</td>"
- "<td>%d</td></tr>",
- EscapeForHTML(key.hostname).c_str(),
- EscapeForHTML(address_family_str).c_str(),
- address_list_html.c_str(),
- ttl_ms));
+ StringAppendF(out,
+ "<td>%s</td><td>%s</td><td>%s</td>"
+ "<td>%d</td></tr>",
+ EscapeForHTML(key.hostname).c_str(),
+ EscapeForHTML(address_family_str).c_str(),
+ address_list_html.c_str(),
+ ttl_ms);
}
out->append("</table>");