SimpleCache: Minimal SimpleFileTracker, port everything but Doom to it.
The idea here is that SimpleFileTracker is a global object which keeps track of
everything SimpleCache opened, so that it can close some files if it's using way
too many FDs, and then re-open when needed again. This does everything but the
actual closing/reopening and some changes to Doom needed to make it safe, as a
discussion/transitional step.
Bug: 636400
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ida05dbdf0db42926bcea003adbb0f4509059f9b9
Reviewed-on: https://chromium-review.googlesource.com/655124
Reviewed-by: Josh Karlin <[email protected]>
Commit-Queue: Maks Orlovich <[email protected]>
Cr-Commit-Position: refs/heads/master@{#512847}
diff --git a/net/BUILD.gn b/net/BUILD.gn
index 68a1209..4f70084 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -698,6 +698,8 @@
"disk_cache/simple/simple_entry_operation.h",
"disk_cache/simple/simple_experiment.cc",
"disk_cache/simple/simple_experiment.h",
+ "disk_cache/simple/simple_file_tracker.cc",
+ "disk_cache/simple/simple_file_tracker.h",
"disk_cache/simple/simple_histogram_macros.h",
"disk_cache/simple/simple_index.cc",
"disk_cache/simple/simple_index.h",
@@ -4718,6 +4720,7 @@
"disk_cache/cache_util_unittest.cc",
"disk_cache/entry_unittest.cc",
"disk_cache/simple/simple_experiment_unittest.cc",
+ "disk_cache/simple/simple_file_tracker_unittest.cc",
"disk_cache/simple/simple_index_file_unittest.cc",
"disk_cache/simple/simple_index_unittest.cc",
"disk_cache/simple/simple_test_util.cc",