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

Unified Diff: chrome/common/net/cookie_monster_sqlite.cc

Issue 39249: No upper cookie limit. Only per host enforced. Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 10 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 | « no previous file | net/base/cookie_monster.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/cookie_monster_sqlite.cc
===================================================================
--- chrome/common/net/cookie_monster_sqlite.cc (revision 11100)
+++ chrome/common/net/cookie_monster_sqlite.cc (working copy)
@@ -334,7 +334,19 @@
}
PrimeCache(db);
+ // Size cookies
+ SQLStatement c_smt;
+ if (c_smt.prepare(db,
+ "SELECT count(*) FROM cookies") != SQLITE_OK) {
+ NOTREACHED() << "select statement prep failed";
+ sqlite3_close(db);
+ return false;
+ }
+ while (c_smt.step() == SQLITE_ROW) {
+ cookies->reserve(c_smt.column_int(0));
+ }
+
// Slurp all the cookies into the out-vector.
SQLStatement smt;
if (smt.prepare(db,
« no previous file with comments | « no previous file | net/base/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698