diff options
author | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-06 17:16:37 +0000 |
---|---|---|
committer | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-06 17:16:37 +0000 |
commit | dcc6432defe5e686ee152926613e14cd0e07e175 (patch) | |
tree | 19cf0e577b0167fad903d80744ac1d6940a085b4 /net/base/cookie_monster_store_test.h | |
parent | bc4db526bda153375e72fe583ce32ed125e9b306 (diff) | |
download | chromium_src-dcc6432defe5e686ee152926613e14cd0e07e175.zip chromium_src-dcc6432defe5e686ee152926613e14cd0e07e175.tar.gz chromium_src-dcc6432defe5e686ee152926613e14cd0e07e175.tar.bz2 |
More cleanup relating to the domain now being part of the CanonicalCookie:
* Simplify DeleteCookie(CanonicalCookie) API
* Get rid of KeyedCanonicalCookie type; not needed.
BUG=8850
TEST=Try bots, net_unittest --gtest_filter=CookieMonsterTest.* (refactor, so tests should all keep passing.)
Review URL: http://codereview.chromium.org/3095002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55241 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 | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/net/base/cookie_monster_store_test.h b/net/base/cookie_monster_store_test.h index 4b1cc52..cd070a7 100644 --- a/net/base/cookie_monster_store_test.h +++ b/net/base/cookie_monster_store_test.h @@ -42,7 +42,7 @@ class MockPersistentCookieStore } virtual bool Load( - std::vector<net::CookieMonster::KeyedCanonicalCookie>* out_cookies) { + std::vector<net::CookieMonster::CanonicalCookie*>* out_cookies) { bool ok = load_return_value_; if (ok) *out_cookies = load_result_; @@ -69,7 +69,7 @@ class MockPersistentCookieStore void SetLoadExpectation( bool return_value, - const std::vector<net::CookieMonster::KeyedCanonicalCookie>& result) { + const std::vector<net::CookieMonster::CanonicalCookie*>& result) { load_return_value_ = return_value; load_result_ = result; } @@ -83,7 +83,7 @@ class MockPersistentCookieStore // Deferred result to use when Load() is called. bool load_return_value_; - std::vector<net::CookieMonster::KeyedCanonicalCookie> load_result_; + std::vector<net::CookieMonster::CanonicalCookie*> load_result_; DISALLOW_COPY_AND_ASSIGN(MockPersistentCookieStore); }; @@ -115,12 +115,12 @@ class MockCookieMonsterDelegate : public net::CookieMonster::Delegate { DISALLOW_COPY_AND_ASSIGN(MockCookieMonsterDelegate); }; -// Helper to build a list of KeyedCanonicalCookies. -static void AddKeyedCookieToList( +// Helper to build a list of CanonicalCookie*s. +static void AddCookieToList( const std::string& key, const std::string& cookie_line, const base::Time& creation_time, - std::vector<net::CookieMonster::KeyedCanonicalCookie>* out_list) { + std::vector<net::CookieMonster::CanonicalCookie*>* out_list) { // Parse the cookie line. net::CookieMonster::ParsedCookie pc(cookie_line); @@ -143,9 +143,7 @@ static void AddKeyedCookieToList( !cookie_expires.is_null(), cookie_expires)); - out_list->push_back( - net::CookieMonster::KeyedCanonicalCookie( - key, cookie.release())); + out_list->push_back(cookie.release()); } } // namespace |