diff options
author | pastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 12:02:23 +0000 |
---|---|---|
committer | pastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 12:02:23 +0000 |
commit | 2d0f89a1b3414922704f97c01b373d3a09139dd7 (patch) | |
tree | 86cdcd5f75ef79e8be271405ec5d27856be8ac83 /net/base/cookie_monster_store_test.h | |
parent | 3a3e66a3e243094e83c829ceccac699076d90e55 (diff) | |
download | chromium_src-2d0f89a1b3414922704f97c01b373d3a09139dd7.zip chromium_src-2d0f89a1b3414922704f97c01b373d3a09139dd7.tar.gz chromium_src-2d0f89a1b3414922704f97c01b373d3a09139dd7.tar.bz2 |
Refactored cookies persistent store clean-up on shutdown.
Changed the static call of SQLitePersistantCookieStore::ClearLocalState to
a call of a virtual method PersistantCookieStore::ClearLocalState from
inside the destruction sequence of the owning UrlRequestContext.
Thus the code will now work with any other persistancy implementation and
allow for better parallelism.
To test. Enable deleting of cookies and user data on shutdown and check if
the Cookies file in the profile directory has been deleted.
BUG=64920
TEST=Manual.
Review URL: http://codereview.chromium.org/5430004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_monster_store_test.h')
-rw-r--r-- | net/base/cookie_monster_store_test.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/base/cookie_monster_store_test.h b/net/base/cookie_monster_store_test.h index 8a21930..65c91b7 100644 --- a/net/base/cookie_monster_store_test.h +++ b/net/base/cookie_monster_store_test.h @@ -66,6 +66,9 @@ class MockPersistentCookieStore CookieStoreCommand(CookieStoreCommand::REMOVE, cookie)); } + // No files are created so nothing to clear either + virtual void SetClearLocalStateOnExit(bool clear_local_state) {} + void SetLoadExpectation( bool return_value, const std::vector<net::CookieMonster::CanonicalCookie*>& result) { @@ -185,6 +188,8 @@ class MockSimplePersistentCookieStore cookies_.erase(it); } + virtual void SetClearLocalStateOnExit(bool clear_local_state) {} + private: CanonicalCookieMap cookies_; }; |