summaryrefslogtreecommitdiffstats
path: root/net/base/cookie_monster.h
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 01:11:25 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 01:11:25 +0000
commit5410255169e0b4d3f20446e970166168890f000a (patch)
tree62c4a3e077e6992b0a28fe88e68d61e90fd3aed3 /net/base/cookie_monster.h
parentfcad492f2e69ba9b91b5eb2108ee381dbe5047d5 (diff)
downloadchromium_src-5410255169e0b4d3f20446e970166168890f000a.zip
chromium_src-5410255169e0b4d3f20446e970166168890f000a.tar.gz
chromium_src-5410255169e0b4d3f20446e970166168890f000a.tar.bz2
Revert the revert... This has the cumulative effect of relanding 38694.
The chrome frame failure appears to be unrelated. 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 TBR=eroman@chromium.org Review URL: http://codereview.chromium.org/596048 TBR=eroman@chromium.org Review URL: http://codereview.chromium.org/604012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38728 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_monster.h')
-rw-r--r--net/base/cookie_monster.h12
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();