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

Unified Diff: net/cookies/cookie_monster.cc

Issue 54303010: Promote the priority aware cookie eviction algorithm from experimental status. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo. Created 7 years, 1 month 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/cookies/cookie_monster.h ('k') | net/cookies/cookie_monster_unittest.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 f8dae50ba214e45b64b25a0786e6d53a14448a86..b7ce4d91a3cfdf4ae4c66c47bf3b84cb8067ab7b 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -330,8 +330,7 @@ CookieMonster::CookieMonster(PersistentCookieStore* store, Delegate* delegate)
delegate_(delegate),
last_statistic_record_time_(Time::Now()),
keep_expired_cookies_(false),
- persist_session_cookies_(false),
- priority_aware_garbage_collection_(false) {
+ persist_session_cookies_(false) {
InitializeHistograms();
SetDefaultCookieableSchemes();
}
@@ -347,8 +346,7 @@ CookieMonster::CookieMonster(PersistentCookieStore* store,
delegate_(delegate),
last_statistic_record_time_(base::Time::Now()),
keep_expired_cookies_(false),
- persist_session_cookies_(false),
- priority_aware_garbage_collection_(false) {
+ persist_session_cookies_(false) {
InitializeHistograms();
SetDefaultCookieableSchemes();
}
@@ -1419,13 +1417,6 @@ void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
persist_session_cookies_ = persist_session_cookies;
}
-// This function must be called before the CookieMonster is used.
-void CookieMonster::SetPriorityAwareGarbageCollection(
- bool priority_aware_garbage_collection) {
- DCHECK(!initialized_);
- priority_aware_garbage_collection_ = priority_aware_garbage_collection;
-}
-
void CookieMonster::SetForceKeepSessionState() {
if (store_.get()) {
store_->SetForceKeepSessionState();
@@ -1968,11 +1959,6 @@ int CookieMonster::GarbageCollect(const Time& current,
for (int i = 0; i < 3 && purge_goal > 0; ++i) {
accumulated_quota += quota[i];
- // If we are not using priority, only do Round 3. This reproduces the
- // old way of indiscriminately purging least-recently accessed cookies.
- if (!priority_aware_garbage_collection_ && i < 2)
- continue;
-
size_t num_considered = it_bdd[i + 1] - it_purge_begin;
if (num_considered <= accumulated_quota)
continue;
« no previous file with comments | « net/cookies/cookie_monster.h ('k') | net/cookies/cookie_monster_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698