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

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: Style fixes. 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..bd64ba9f874a607d447a17e34bc427df3af39c07 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 a SQLite database.
+// For documentation about the actual member functions consult the documentation
+// 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) {
jochen (gone - plz use gerrit) 2010/12/02 16:48:44 virtual
pastarmovj 2010/12/03 16:43:02 Done.
+ 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.
jochen (gone - plz use gerrit) 2010/12/02 16:48:44 True if ..
pastarmovj 2010/12/03 16:43:02 Done.
+ bool clear_local_state_on_exit_;
+
sql::MetaTable meta_table_;
DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore);

Powered by Google App Engine
This is Rietveld 408576698