Index: net/base/cookie_monster.h |
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h |
index cdb508ee971e0232cd8dd082d088300a809317dc..c32f38ac5dc0fe0f25d0f02d6dbd0572dc25f1b6 100644 |
--- a/net/base/cookie_monster.h |
+++ b/net/base/cookie_monster.h |
@@ -206,6 +206,12 @@ class CookieMonster : public CookieStore { |
// function must be called before initialization. |
void SetExpiryAndKeyScheme(ExpiryAndKeyScheme key_scheme); |
+ // Retrieves the persistent store if it exists. This function will return |
+ // NULL for incognito mode. |
+ PersistentCookieStore* GetPersistentCookieStore() { |
+ return store_.get(); |
jochen (gone - plz use gerrit)
2010/12/02 16:48:44
instead of this, add SetClearLocalStateOnExit() to
Randy Smith (Not in Mondays)
2010/12/02 21:19:26
Seconded; to the extent possible, I'd like to hide
pastarmovj
2010/12/03 16:43:02
Done.
|
+ } |
+ |
// There are some unknowns about how to correctly handle file:// cookies, |
// and our implementation for this is not robust enough. This allows you |
// to enable support, but it should only be used for testing. Bug 1157243. |
@@ -676,18 +682,22 @@ typedef base::RefCountedThreadSafe<CookieMonster::PersistentCookieStore> |
class CookieMonster::PersistentCookieStore |
: public RefcountedPersistentCookieStore { |
public: |
- virtual ~PersistentCookieStore() { } |
+ virtual ~PersistentCookieStore() {} |
// Initializes the store and retrieves the existing cookies. This will be |
// called only once at startup. |
- virtual bool Load(std::vector<CookieMonster::CanonicalCookie*>*) = 0; |
+ virtual bool Load(std::vector<CookieMonster::CanonicalCookie*>* cookies) = 0; |
+ |
+ virtual void AddCookie(const CanonicalCookie& cc) = 0; |
+ virtual void UpdateCookieAccessTime(const CanonicalCookie& cc) = 0; |
+ virtual void DeleteCookie(const CanonicalCookie& cc) = 0; |
- virtual void AddCookie(const CanonicalCookie&) = 0; |
- virtual void UpdateCookieAccessTime(const CanonicalCookie&) = 0; |
- virtual void DeleteCookie(const CanonicalCookie&) = 0; |
+ // Sets the value of the user preference whether the persistent storage |
+ // must be deleted upon destruction. |
+ virtual void SetClearLocalStateOnExit(bool clear_local_state) = 0; |
protected: |
- PersistentCookieStore() { } |
+ PersistentCookieStore() {} |
private: |
DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); |