diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 23:00:40 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 23:00:40 +0000 |
commit | e2d745a40960443829db963121e972b4ede877a0 (patch) | |
tree | 2015e7e140878ef61af19a5adb1e7d9d4b93b98d /net/base/cookie_monster.h | |
parent | b647cf88f396b6d60aaa7f2206d37b3a9a2e4a50 (diff) | |
download | chromium_src-e2d745a40960443829db963121e972b4ede877a0.zip chromium_src-e2d745a40960443829db963121e972b4ede877a0.tar.gz chromium_src-e2d745a40960443829db963121e972b4ede877a0.tar.bz2 |
Add some tests to CookieMonster for overwriting persistent cookies, and checking that the PersistentCookieStore interface is exercised correctly.
Review URL: http://codereview.chromium.org/600040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_monster.h')
-rw-r--r-- | net/base/cookie_monster.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h index f73698d..6ae2903 100644 --- a/net/base/cookie_monster.h +++ b/net/base/cookie_monster.h @@ -50,19 +50,17 @@ class CookieMonster : public CookieStore { typedef std::pair<std::string, CanonicalCookie> CookieListPair; typedef std::vector<CookieListPair> CookieList; - - CookieMonster(); - // The store passed in should not have had Init() called on it yet. This class // will take care of initializing it. The backing store is NOT owned by this // class, but it must remain valid for the duration of the cookie monster's - // existence. - CookieMonster(PersistentCookieStore* store); + // existence. If |store| is NULL, then no backing store will be updated. + explicit CookieMonster(PersistentCookieStore* store); #ifdef UNIT_TEST - CookieMonster(int last_access_threshold_milliseconds) + CookieMonster(PersistentCookieStore* store, + int last_access_threshold_milliseconds) : initialized_(false), - store_(NULL), + store_(store), last_access_threshold_(base::TimeDelta::FromMilliseconds( last_access_threshold_milliseconds)) { SetDefaultCookieableSchemes(); |