Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: net/cookies/cookie_monster_store_test.h

Issue 10447117: Unwire the clear on exit preference from the storage systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains test infrastructure for multiple files 5 // This file contains test infrastructure for multiple files
6 // (current cookie_monster_unittest.cc and cookie_monster_perftest.cc) 6 // (current cookie_monster_unittest.cc and cookie_monster_perftest.cc)
7 // that need to test out CookieMonster interactions with the backing store. 7 // that need to test out CookieMonster interactions with the backing store.
8 // It should only be included by test code. 8 // It should only be included by test code.
9 9
10 #ifndef NET_COOKIES_COOKIE_MONSTER_STORE_TEST_H_ 10 #ifndef NET_COOKIES_COOKIE_MONSTER_STORE_TEST_H_
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual void AddCookie(const CookieMonster::CanonicalCookie& cookie) OVERRIDE; 91 virtual void AddCookie(const CookieMonster::CanonicalCookie& cookie) OVERRIDE;
92 92
93 virtual void UpdateCookieAccessTime( 93 virtual void UpdateCookieAccessTime(
94 const CookieMonster::CanonicalCookie& cookie) OVERRIDE; 94 const CookieMonster::CanonicalCookie& cookie) OVERRIDE;
95 95
96 virtual void DeleteCookie( 96 virtual void DeleteCookie(
97 const CookieMonster::CanonicalCookie& cookie) OVERRIDE; 97 const CookieMonster::CanonicalCookie& cookie) OVERRIDE;
98 98
99 virtual void Flush(const base::Closure& callback) OVERRIDE; 99 virtual void Flush(const base::Closure& callback) OVERRIDE;
100 100
101 // No files are created so nothing to clear either 101 virtual void SetForceKeepSessionState() OVERRIDE;
102 virtual void SetClearLocalStateOnExit(bool clear_local_state) OVERRIDE;
103 102
104 protected: 103 protected:
105 virtual ~MockPersistentCookieStore(); 104 virtual ~MockPersistentCookieStore();
106 105
107 private: 106 private:
108 CommandList commands_; 107 CommandList commands_;
109 108
110 // Deferred result to use when Load() is called. 109 // Deferred result to use when Load() is called.
111 bool load_return_value_; 110 bool load_return_value_;
112 std::vector<CookieMonster::CanonicalCookie*> load_result_; 111 std::vector<CookieMonster::CanonicalCookie*> load_result_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 const CookieMonster::CanonicalCookie& cookie) OVERRIDE; 170 const CookieMonster::CanonicalCookie& cookie) OVERRIDE;
172 171
173 virtual void UpdateCookieAccessTime( 172 virtual void UpdateCookieAccessTime(
174 const CookieMonster::CanonicalCookie& cookie) OVERRIDE; 173 const CookieMonster::CanonicalCookie& cookie) OVERRIDE;
175 174
176 virtual void DeleteCookie( 175 virtual void DeleteCookie(
177 const CookieMonster::CanonicalCookie& cookie) OVERRIDE; 176 const CookieMonster::CanonicalCookie& cookie) OVERRIDE;
178 177
179 virtual void Flush(const base::Closure& callback) OVERRIDE; 178 virtual void Flush(const base::Closure& callback) OVERRIDE;
180 179
181 virtual void SetClearLocalStateOnExit(bool clear_local_state) OVERRIDE; 180 virtual void SetForceKeepSessionState() OVERRIDE;
182 181
183 protected: 182 protected:
184 virtual ~MockSimplePersistentCookieStore(); 183 virtual ~MockSimplePersistentCookieStore();
185 184
186 private: 185 private:
187 typedef std::map<int64, CookieMonster::CanonicalCookie> 186 typedef std::map<int64, CookieMonster::CanonicalCookie>
188 CanonicalCookieMap; 187 CanonicalCookieMap;
189 188
190 CanonicalCookieMap cookies_; 189 CanonicalCookieMap cookies_;
191 190
(...skipping 11 matching lines...) Expand all
203 // longer than |gc_perf_micros| to complete, and how many cookie were 202 // longer than |gc_perf_micros| to complete, and how many cookie were
204 // left in the store afterwards. 203 // left in the store afterwards.
205 CookieMonster* CreateMonsterFromStoreForGC( 204 CookieMonster* CreateMonsterFromStoreForGC(
206 int num_cookies, 205 int num_cookies,
207 int num_old_cookies, 206 int num_old_cookies,
208 int days_old); 207 int days_old);
209 208
210 } // namespace net 209 } // namespace net
211 210
212 #endif // NET_COOKIES_COOKIE_MONSTER_STORE_TEST_H_ 211 #endif // NET_COOKIES_COOKIE_MONSTER_STORE_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698