From 71ed91106ec950734360353775b8579862ff6524 Mon Sep 17 00:00:00 2001 From: "eroman@chromium.org" Date: Fri, 15 Jan 2010 22:14:34 +0000 Subject: 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 --- .../url_request_view_net_internals_job.cc | 47 ++++++++++++---------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'net/url_request') 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("", - title.c_str(), - command.c_str())); + StringAppendF(data, "", + title.c_str(), + command.c_str()); } @@ -79,13 +78,15 @@ class SubSection { url_format->MakeURL(GetFullyQualifiedName()).spec(); // Print the heading. - out->append(StringPrintf("
" + StringAppendF( + out, + "
" "%s " "(%s)" "
", EscapeForHTML(title_).c_str(), section_url.c_str(), - EscapeForHTML(section_url).c_str())); + EscapeForHTML(section_url).c_str()); out->append("
"); } @@ -261,15 +262,16 @@ class HostResolverCacheSubSection : public SubSection { DrawCommandButton("Clear", "clear-hostcache", out); - out->append(StringPrintf( - "
  • Size: %" PRIuS "
  • " - "
  • Capacity: %" PRIuS "
  • " - "
  • Time to live (ms) for success entries: %" PRId64"
  • " - "
  • Time to live (ms) for failure entries: %" PRId64"
", - host_cache->size(), - host_cache->max_entries(), - host_cache->success_entry_ttl().InMilliseconds(), - host_cache->failure_entry_ttl().InMilliseconds())); + StringAppendF( + out, + "
  • Size: %" PRIuS "
  • " + "
  • Capacity: %" PRIuS "
  • " + "
  • Time to live (ms) for success entries: %" PRId64"
  • " + "
  • Time to live (ms) for failure entries: %" PRId64"
", + host_cache->size(), + host_cache->max_entries(), + host_cache->success_entry_ttl().InMilliseconds(), + host_cache->failure_entry_ttl().InMilliseconds()); out->append("" "" @@ -320,12 +322,13 @@ class HostResolverCacheSubSection : public SubSection { } } - out->append(StringPrintf("" - "", - EscapeForHTML(key.hostname).c_str(), - EscapeForHTML(address_family_str).c_str(), - address_list_html.c_str(), - ttl_ms)); + StringAppendF(out, + "" + "", + EscapeForHTML(key.hostname).c_str(), + EscapeForHTML(address_family_str).c_str(), + address_list_html.c_str(), + ttl_ms); } out->append("
%s%s%s%d
%s%s%s%d
"); -- cgit v1.1