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

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

Issue 1701063002: CookieStore: Remove reference counting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@threadsafe
Patch Set: merge Created 4 years, 9 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
« no previous file with comments | « net/cookies/cookie_monster_perftest.cc ('k') | net/cookies/cookie_monster_store_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
11 #define NET_COOKIES_COOKIE_MONSTER_STORE_TEST_H_ 11 #define NET_COOKIES_COOKIE_MONSTER_STORE_TEST_H_
12 12
13 #include <stdint.h> 13 #include <stdint.h>
14 14
15 #include <map> 15 #include <map>
16 #include <string> 16 #include <string>
17 #include <utility> 17 #include <utility>
18 #include <vector> 18 #include <vector>
19 19
20 #include "base/macros.h" 20 #include "base/macros.h"
21 #include "base/memory/scoped_ptr.h"
21 #include "net/cookies/canonical_cookie.h" 22 #include "net/cookies/canonical_cookie.h"
22 #include "net/cookies/cookie_monster.h" 23 #include "net/cookies/cookie_monster.h"
23 24
24 namespace base { 25 namespace base {
25 class Time; 26 class Time;
26 } 27 }
27 28
28 namespace net { 29 namespace net {
29 30
30 // Wrapper class for posting a loaded callback. Since the Callback class is not 31 // Wrapper class for posting a loaded callback. Since the Callback class is not
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 184
184 // Helper function for creating a CookieMonster backed by a 185 // Helper function for creating a CookieMonster backed by a
185 // MockSimplePersistentCookieStore for garbage collection testing. 186 // MockSimplePersistentCookieStore for garbage collection testing.
186 // 187 //
187 // Fill the store through import with |num_*_cookies| cookies, 188 // Fill the store through import with |num_*_cookies| cookies,
188 // |num_old_*_cookies| with access time Now()-days_old, the rest with access 189 // |num_old_*_cookies| with access time Now()-days_old, the rest with access
189 // time Now(). Cookies made by |num_secure_cookies| and |num_non_secure_cookies| 190 // time Now(). Cookies made by |num_secure_cookies| and |num_non_secure_cookies|
190 // will be marked secure and non-secure, respectively. Do two SetCookies(). 191 // will be marked secure and non-secure, respectively. Do two SetCookies().
191 // Return whether each of the two SetCookies() took longer than |gc_perf_micros| 192 // Return whether each of the two SetCookies() took longer than |gc_perf_micros|
192 // to complete, and how many cookie were left in the store afterwards. 193 // to complete, and how many cookie were left in the store afterwards.
193 CookieMonster* CreateMonsterFromStoreForGC(int num_secure_cookies, 194 scoped_ptr<CookieMonster> CreateMonsterFromStoreForGC(
194 int num_old_secure_cookies, 195 int num_secure_cookies,
195 int num_non_secure_cookies, 196 int num_old_secure_cookies,
196 int num_old_non_secure_cookies, 197 int num_non_secure_cookies,
197 int days_old); 198 int num_old_non_secure_cookies,
199 int days_old);
198 200
199 } // namespace net 201 } // namespace net
200 202
201 #endif // NET_COOKIES_COOKIE_MONSTER_STORE_TEST_H_ 203 #endif // NET_COOKIES_COOKIE_MONSTER_STORE_TEST_H_
OLDNEW
« no previous file with comments | « net/cookies/cookie_monster_perftest.cc ('k') | net/cookies/cookie_monster_store_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698