OLD | NEW |
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 #ifndef NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_ | 5 #ifndef NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_ |
6 #define NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_ | 6 #define NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // Provides basic support for cache related tests. | 56 // Provides basic support for cache related tests. |
57 class DiskCacheTestWithCache : public DiskCacheTest { | 57 class DiskCacheTestWithCache : public DiskCacheTest { |
58 protected: | 58 protected: |
59 DiskCacheTestWithCache(); | 59 DiskCacheTestWithCache(); |
60 virtual ~DiskCacheTestWithCache(); | 60 virtual ~DiskCacheTestWithCache(); |
61 | 61 |
62 void CreateBackend(uint32 flags, base::Thread* thread); | 62 void CreateBackend(uint32 flags, base::Thread* thread); |
63 | 63 |
64 void InitCache(); | 64 void InitCache(); |
65 void InitDefaultCacheViaCreator(); | |
66 void SimulateCrash(); | 65 void SimulateCrash(); |
67 void SetTestMode(); | 66 void SetTestMode(); |
68 | 67 |
69 void SetMemoryOnlyMode() { | 68 void SetMemoryOnlyMode() { |
70 memory_only_ = true; | 69 memory_only_ = true; |
71 } | 70 } |
72 | 71 |
73 void SetSimpleCacheMode() { | 72 void SetSimpleCacheMode() { |
74 simple_cache_mode_ = true; | 73 simple_cache_mode_ = true; |
75 } | 74 } |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 160 |
162 private: | 161 private: |
163 void InitMemoryCache(); | 162 void InitMemoryCache(); |
164 void InitDiskCache(); | 163 void InitDiskCache(); |
165 | 164 |
166 base::Thread cache_thread_; | 165 base::Thread cache_thread_; |
167 DISALLOW_COPY_AND_ASSIGN(DiskCacheTestWithCache); | 166 DISALLOW_COPY_AND_ASSIGN(DiskCacheTestWithCache); |
168 }; | 167 }; |
169 | 168 |
170 #endif // NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_ | 169 #endif // NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_ |
OLD | NEW |