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

Unified Diff: net/base/host_port_pair.cc

Issue 745373002: Optimized HostPortPair::ToString and CookieMonster::GetAllCookiesForURLWithOptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed GetFlattenedSpdyServer and optimized HostPortPair::ToString(). Created 6 years 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 | « no previous file | net/cookies/cookie_monster.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_port_pair.cc
diff --git a/net/base/host_port_pair.cc b/net/base/host_port_pair.cc
index 1570bbb5718606e25057f07069b16d194aaaba6f..1550c36f616c258da2fd6c76cf996087ee355042 100644
--- a/net/base/host_port_pair.cc
+++ b/net/base/host_port_pair.cc
@@ -47,7 +47,10 @@ HostPortPair HostPortPair::FromString(const std::string& str) {
}
std::string HostPortPair::ToString() const {
- return base::StringPrintf("%s:%u", HostForURL().c_str(), port_);
+ std::string ret(HostForURL());
+ ret += ':';
+ ret += base::IntToString(port_);
+ return ret;
}
std::string HostPortPair::HostForURL() const {
« no previous file with comments | « no previous file | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698