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

Side by Side Diff: net/disk_cache/disk_cache_test_base.h

Issue 2874833005: SimpleCache: read small files all at once. (Closed)
Patch Set: Add some metrics and an experiment knob. Not really happy with coverage, though. Created 3 years, 5 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
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 #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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/files/scoped_temp_dir.h" 13 #include "base/files/scoped_temp_dir.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/metrics/field_trial.h"
16 #include "base/test/scoped_feature_list.h"
15 #include "base/threading/thread.h" 17 #include "base/threading/thread.h"
16 #include "net/base/cache_type.h" 18 #include "net/base/cache_type.h"
17 #include "net/disk_cache/disk_cache.h" 19 #include "net/disk_cache/disk_cache.h"
18 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
19 #include "testing/platform_test.h" 21 #include "testing/platform_test.h"
20 22
21 namespace net { 23 namespace net {
22 24
23 class IOBuffer; 25 class IOBuffer;
24 26
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 bool first_cleanup_; 184 bool first_cleanup_;
183 bool integrity_; 185 bool integrity_;
184 bool use_current_thread_; 186 bool use_current_thread_;
185 // This is intentionally left uninitialized, to be used by any test. 187 // This is intentionally left uninitialized, to be used by any test.
186 bool success_; 188 bool success_;
187 189
188 private: 190 private:
189 void InitMemoryCache(); 191 void InitMemoryCache();
190 void InitDiskCache(); 192 void InitDiskCache();
191 193
194 // Need to have the one "global" trial list before we change things.
195 std::unique_ptr<base::FieldTrialList> field_trial_list_;
196 base::test::ScopedFeatureList scoped_feature_list_;
197
192 base::Thread cache_thread_; 198 base::Thread cache_thread_;
193 DISALLOW_COPY_AND_ASSIGN(DiskCacheTestWithCache); 199 DISALLOW_COPY_AND_ASSIGN(DiskCacheTestWithCache);
194 }; 200 };
195 201
196 #endif // NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_ 202 #endif // NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/disk_cache_test_base.cc » ('j') | net/disk_cache/disk_cache_test_base.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698