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

Unified Diff: net/base/net_util.cc

Issue 3390026: net: Append base:: in the StringPrintf calls. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix include order Created 10 years, 3 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/base/host_resolver_impl_unittest.cc ('k') | net/base/net_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 09356356117e829a01d92e6128daefcb5fea4bc8..ddc1da7a0bbecdbd009bb87b8809fbd2bb2534a8 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -50,15 +50,16 @@
#include "base/string_split.h"
#include "base/string_tokenizer.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/sys_string_conversions.h"
#include "base/time.h"
#include "base/utf_offset_string_conversions.h"
#include "base/utf_string_conversions.h"
-#include "grit/net_resources.h"
#include "googleurl/src/gurl.h"
#include "googleurl/src/url_canon.h"
#include "googleurl/src/url_canon_ip.h"
#include "googleurl/src/url_parse.h"
+#include "grit/net_resources.h"
#include "net/base/dns_util.h"
#include "net/base/escape.h"
#include "net/base/net_module.h"
@@ -1509,14 +1510,15 @@ bool ParseHostAndPort(const std::string& host_and_port,
std::string GetHostAndPort(const GURL& url) {
// For IPv6 literals, GURL::host() already includes the brackets so it is
// safe to just append a colon.
- return StringPrintf("%s:%d", url.host().c_str(), url.EffectiveIntPort());
+ return base::StringPrintf("%s:%d", url.host().c_str(),
+ url.EffectiveIntPort());
}
std::string GetHostAndOptionalPort(const GURL& url) {
// For IPv6 literals, GURL::host() already includes the brackets
// so it is safe to just append a colon.
if (url.has_port())
- return StringPrintf("%s:%s", url.host().c_str(), url.port().c_str());
+ return base::StringPrintf("%s:%s", url.host().c_str(), url.port().c_str());
return url.host();
}
@@ -1547,10 +1549,10 @@ std::string NetAddressToStringWithPort(const struct addrinfo* net_address) {
if (ip_address_string.find(':') != std::string::npos) {
// Surround with square brackets to avoid ambiguity.
- return StringPrintf("[%s]:%d", ip_address_string.c_str(), port);
+ return base::StringPrintf("[%s]:%d", ip_address_string.c_str(), port);
}
- return StringPrintf("%s:%d", ip_address_string.c_str(), port);
+ return base::StringPrintf("%s:%d", ip_address_string.c_str(), port);
}
std::string GetHostName() {
« no previous file with comments | « net/base/host_resolver_impl_unittest.cc ('k') | net/base/net_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698