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

Unified Diff: net/cookies/cookie_monster.cc

Issue 1769023003: Drop the PRE_SAFE/POST_SAFE distinction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mmenke-cookies
Patch Set: Rebase. Created 4 years, 9 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/cookies/cookie_monster.h ('k') | no next file » | 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 19a2d6ac7f81f99dca36e1ec8fc1f47e6c722b71..1984bad6a962c405d90a39f9181c7deef6217b1a 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -1901,9 +1901,8 @@ size_t CookieMonster::GarbageCollect(const Time& current,
size_t quota = 0;
for (size_t i = 0; i < arraysize(kQuotas) && purge_goal > 0; i++) {
quota += kQuotas[i];
- size_t just_deleted =
- PurgeLeastRecentMatches(cookie_its, static_cast<CookiePriority>(i),
- quota, purge_goal, safe_date);
+ size_t just_deleted = PurgeLeastRecentMatches(
+ cookie_its, static_cast<CookiePriority>(i), quota, purge_goal);
DCHECK_LE(just_deleted, purge_goal);
purge_goal -= just_deleted;
num_deleted += just_deleted;
@@ -1959,8 +1958,7 @@ size_t CookieMonster::GarbageCollect(const Time& current,
size_t CookieMonster::PurgeLeastRecentMatches(CookieItVector* cookies,
CookiePriority priority,
size_t to_protect,
- size_t purge_goal,
- const base::Time& safe_date) {
+ size_t purge_goal) {
DCHECK(thread_checker_.CalledOnValidThread());
// Find the first protected cookie by walking down from the end of the list
@@ -1980,11 +1978,8 @@ size_t CookieMonster::PurgeLeastRecentMatches(CookieItVector* cookies,
size_t current = 0;
while (removed < purge_goal && current < protection_boundary) {
if (cookies->at(current)->second->Priority() <= priority) {
- InternalDeleteCookie(
- cookies->at(current), true,
- cookies->at(current)->second->LastAccessDate() > safe_date
- ? DELETE_COOKIE_EVICTED_DOMAIN_PRE_SAFE
- : DELETE_COOKIE_EVICTED_DOMAIN_POST_SAFE);
+ InternalDeleteCookie(cookies->at(current), true,
+ DELETE_COOKIE_EVICTED_DOMAIN);
cookies->erase(cookies->begin() + current);
removed++;
« no previous file with comments | « net/cookies/cookie_monster.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698