| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BASE_COOKIE_MONSTER_STORE_TEST_H_ | 10 #ifndef NET_BASE_COOKIE_MONSTER_STORE_TEST_H_ |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 MockCookieMonsterDelegate(); | 122 MockCookieMonsterDelegate(); |
| 123 | 123 |
| 124 const std::vector<CookieNotification>& changes() const { return changes_; } | 124 const std::vector<CookieNotification>& changes() const { return changes_; } |
| 125 | 125 |
| 126 void reset() { changes_.clear(); } | 126 void reset() { changes_.clear(); } |
| 127 | 127 |
| 128 virtual void OnCookieChanged( | 128 virtual void OnCookieChanged( |
| 129 const CookieMonster::CanonicalCookie& cookie, | 129 const CookieMonster::CanonicalCookie& cookie, |
| 130 bool removed, | 130 bool removed, |
| 131 CookieMonster::Delegate::ChangeCause cause); | 131 CookieMonster::Delegate::ChangeCause cause) OVERRIDE; |
| 132 | 132 |
| 133 private: | 133 private: |
| 134 virtual ~MockCookieMonsterDelegate(); | 134 virtual ~MockCookieMonsterDelegate(); |
| 135 | 135 |
| 136 std::vector<CookieNotification> changes_; | 136 std::vector<CookieNotification> changes_; |
| 137 | 137 |
| 138 DISALLOW_COPY_AND_ASSIGN(MockCookieMonsterDelegate); | 138 DISALLOW_COPY_AND_ASSIGN(MockCookieMonsterDelegate); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 // Helper to build a single CanonicalCookie. | 141 // Helper to build a single CanonicalCookie. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // longer than |gc_perf_micros| to complete, and how many cookie were | 197 // longer than |gc_perf_micros| to complete, and how many cookie were |
| 198 // left in the store afterwards. | 198 // left in the store afterwards. |
| 199 CookieMonster* CreateMonsterFromStoreForGC( | 199 CookieMonster* CreateMonsterFromStoreForGC( |
| 200 int num_cookies, | 200 int num_cookies, |
| 201 int num_old_cookies, | 201 int num_old_cookies, |
| 202 int days_old); | 202 int days_old); |
| 203 | 203 |
| 204 } // namespace net | 204 } // namespace net |
| 205 | 205 |
| 206 #endif // NET_BASE_COOKIE_MONSTER_STORE_TEST_H_ | 206 #endif // NET_BASE_COOKIE_MONSTER_STORE_TEST_H_ |
| OLD | NEW |