Chromium Code Reviews| Index: net/base/cookie_monster.h |
| diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h |
| index cdb508ee971e0232cd8dd082d088300a809317dc..08f0d6f3195358cdb402c79c712ca9ea52593b95 100644 |
| --- a/net/base/cookie_monster.h |
| +++ b/net/base/cookie_monster.h |
| @@ -206,6 +206,14 @@ class CookieMonster : public CookieStore { |
| // function must be called before initialization. |
| void SetExpiryAndKeyScheme(ExpiryAndKeyScheme key_scheme); |
| + PersistentCookieStore* GetPersistentCookieStore() { |
| + return store_.get(); |
| + } |
| + |
| + void DetachPersistentCookieStore() { |
| + store_ = NULL; |
|
jochen (gone - plz use gerrit)
2010/12/02 15:09:51
still required?
pastarmovj
2010/12/02 16:29:07
Nope sorry.
|
| + } |
| + |
| // 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 +684,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); |