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

Unified Diff: net/cookies/cookie_monster.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 | « net/base/host_port_pair.cc ('k') | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster.cc
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index cd9c9b8f34dafb148c79fc3fd58ac30ebfe95476..e879a8faca7b700cc835deae40c13477892a4a02 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -1162,6 +1162,7 @@ CookieList CookieMonster::GetAllCookiesForURLWithOptions(
std::sort(cookie_ptrs.begin(), cookie_ptrs.end(), CookieSorter);
CookieList cookies;
+ cookies.reserve(cookie_ptrs.size());
for (std::vector<CanonicalCookie*>::const_iterator it = cookie_ptrs.begin();
it != cookie_ptrs.end(); it++)
cookies.push_back(**it);
« no previous file with comments | « net/base/host_port_pair.cc ('k') | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698