| 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(); | 65 void CreateCacheViaPublicInterface(); |
| 66 void SimulateCrash(); | 66 void SimulateCrash(); |
| 67 void SetTestMode(); | 67 void SetTestMode(); |
| 68 | 68 |
| 69 void SetMemoryOnlyMode() { | 69 void SetMemoryOnlyMode() { |
| 70 memory_only_ = true; | 70 memory_only_ = true; |
| 71 } | 71 } |
| 72 | 72 |
| 73 void SetSimpleCacheMode() { | 73 void SetSimpleCacheMode() { |
| 74 simple_cache_mode_ = true; | 74 simple_cache_mode_ = true; |
| 75 } | 75 } |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 private: | 162 private: |
| 163 void InitMemoryCache(); | 163 void InitMemoryCache(); |
| 164 void InitDiskCache(); | 164 void InitDiskCache(); |
| 165 | 165 |
| 166 base::Thread cache_thread_; | 166 base::Thread cache_thread_; |
| 167 DISALLOW_COPY_AND_ASSIGN(DiskCacheTestWithCache); | 167 DISALLOW_COPY_AND_ASSIGN(DiskCacheTestWithCache); |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 #endif // NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_ | 170 #endif // NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_ |
| OLD | NEW |