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

Unified Diff: chrome/browser/net/sqlite_persistent_cookie_store.h

Issue 5430004: Refactored cookies persistent store clean-up on shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unit test and moved flag to the persistence store itself. Created 10 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
Index: chrome/browser/net/sqlite_persistent_cookie_store.h
diff --git a/chrome/browser/net/sqlite_persistent_cookie_store.h b/chrome/browser/net/sqlite_persistent_cookie_store.h
index b7167f0badc5eb10b59c5b924945963a1773bead..e8d0a3108a2c9011eb260678d6cfd7a41295f24f 100644
--- a/chrome/browser/net/sqlite_persistent_cookie_store.h
+++ b/chrome/browser/net/sqlite_persistent_cookie_store.h
@@ -22,20 +22,25 @@ class Connection;
class FilePath;
+// Implements the PersistentCookieStore interface in terms of SQLite database.
jochen (gone - plz use gerrit) 2010/12/02 15:09:51 ... in terms of a ... or ... using a ...
pastarmovj 2010/12/02 16:29:07 Done.
+// For documentation of the actually member functions consult the documentation
jochen (gone - plz use gerrit) 2010/12/02 15:09:51 documentation about
pastarmovj 2010/12/02 16:29:07 Done.
+// of the parent class |net::CookieMonster::PersistentCookieStore|.
class SQLitePersistentCookieStore
: public net::CookieMonster::PersistentCookieStore {
public:
explicit SQLitePersistentCookieStore(const FilePath& path);
virtual ~SQLitePersistentCookieStore();
- virtual bool Load(std::vector<net::CookieMonster::CanonicalCookie*>*);
+ virtual bool Load(std::vector<net::CookieMonster::CanonicalCookie*>* cookies);
- virtual void AddCookie(const net::CookieMonster::CanonicalCookie&);
+ virtual void AddCookie(const net::CookieMonster::CanonicalCookie& cc);
virtual void UpdateCookieAccessTime(
- const net::CookieMonster::CanonicalCookie&);
- virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie&);
+ const net::CookieMonster::CanonicalCookie& cc);
+ virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie& cc);
- static void ClearLocalState(const FilePath& path);
+ void SetClearLocalStateOnExit(bool clear_local_state) {
+ clear_local_state_on_exit_ = clear_local_state;
+ }
private:
class Backend;
@@ -46,6 +51,9 @@ class SQLitePersistentCookieStore
FilePath path_;
scoped_refptr<Backend> backend_;
+ // If true the persistent store should be deleted upon destruction.
+ bool clear_local_state_on_exit_;
+
sql::MetaTable meta_table_;
DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore);

Powered by Google App Engine
This is Rietveld 408576698