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

Side by Side Diff: net/cookies/cookie_monster.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/net/sqlite_persistent_cookie_store.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Brought to you by the letter D and the number 2. 5 // Brought to you by the letter D and the number 2.
6 6
7 #ifndef NET_COOKIES_COOKIE_MONSTER_H_ 7 #ifndef NET_COOKIES_COOKIE_MONSTER_H_
8 #define NET_COOKIES_COOKIE_MONSTER_H_ 8 #define NET_COOKIES_COOKIE_MONSTER_H_
9 9
10 #include <deque> 10 #include <deque>
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 virtual void DeleteSessionCookiesAsync(const DeleteCallback&) OVERRIDE; 282 virtual void DeleteSessionCookiesAsync(const DeleteCallback&) OVERRIDE;
283 283
284 virtual CookieMonster* GetCookieMonster() OVERRIDE; 284 virtual CookieMonster* GetCookieMonster() OVERRIDE;
285 285
286 // Enables writing session cookies into the cookie database. If this this 286 // Enables writing session cookies into the cookie database. If this this
287 // method is called, it must be called before first use of the instance 287 // method is called, it must be called before first use of the instance
288 // (i.e. as part of the instance initialization process). 288 // (i.e. as part of the instance initialization process).
289 void SetPersistSessionCookies(bool persist_session_cookies); 289 void SetPersistSessionCookies(bool persist_session_cookies);
290 290
291 // Enables the new garbage collection algorithm where domain cookie eviction
292 // uses cookie priorities to decide which cookies to purge and which to keep.
293 void SetPriorityAwareGarbageCollection(
294 bool priority_aware_garbage_collection);
295
296 // Debugging method to perform various validation checks on the map. 291 // Debugging method to perform various validation checks on the map.
297 // Currently just checking that there are no null CanonicalCookie pointers 292 // Currently just checking that there are no null CanonicalCookie pointers
298 // in the map. 293 // in the map.
299 // Argument |arg| is to allow retaining of arbitrary data if the CHECKs 294 // Argument |arg| is to allow retaining of arbitrary data if the CHECKs
300 // in the function trip. TODO(rdsmith):Remove hack. 295 // in the function trip. TODO(rdsmith):Remove hack.
301 void ValidateMap(int arg); 296 void ValidateMap(int arg);
302 297
303 // Determines if the scheme of the URL is a scheme that cookies will be 298 // Determines if the scheme of the URL is a scheme that cookies will be
304 // stored for. 299 // stored for.
305 bool IsCookieableScheme(const std::string& scheme); 300 bool IsCookieableScheme(const std::string& scheme);
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 668
674 scoped_refptr<Delegate> delegate_; 669 scoped_refptr<Delegate> delegate_;
675 670
676 // Lock for thread-safety 671 // Lock for thread-safety
677 base::Lock lock_; 672 base::Lock lock_;
678 673
679 base::Time last_statistic_record_time_; 674 base::Time last_statistic_record_time_;
680 675
681 bool keep_expired_cookies_; 676 bool keep_expired_cookies_;
682 bool persist_session_cookies_; 677 bool persist_session_cookies_;
683 bool priority_aware_garbage_collection_;
684 678
685 // Static setting for whether or not file scheme cookies are allows when 679 // Static setting for whether or not file scheme cookies are allows when
686 // a new CookieMonster is created, or the accepted schemes on a CookieMonster 680 // a new CookieMonster is created, or the accepted schemes on a CookieMonster
687 // instance are reset back to defaults. 681 // instance are reset back to defaults.
688 static bool default_enable_file_scheme_; 682 static bool default_enable_file_scheme_;
689 683
690 DISALLOW_COPY_AND_ASSIGN(CookieMonster); 684 DISALLOW_COPY_AND_ASSIGN(CookieMonster);
691 }; 685 };
692 686
693 class NET_EXPORT CookieMonster::Delegate 687 class NET_EXPORT CookieMonster::Delegate
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 virtual ~PersistentCookieStore() {} 758 virtual ~PersistentCookieStore() {}
765 759
766 private: 760 private:
767 friend class base::RefCountedThreadSafe<PersistentCookieStore>; 761 friend class base::RefCountedThreadSafe<PersistentCookieStore>;
768 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); 762 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore);
769 }; 763 };
770 764
771 } // namespace net 765 } // namespace net
772 766
773 #endif // NET_COOKIES_COOKIE_MONSTER_H_ 767 #endif // NET_COOKIES_COOKIE_MONSTER_H_
OLDNEW
« no previous file with comments | « content/browser/net/sqlite_persistent_cookie_store.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698