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

Side by Side Diff: net/disk_cache/simple/simple_index_file.h

Issue 2774923002: Try to speed up SimpleCache index re-sync on Windows. (Closed)
Patch Set: Created 3 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_SIMPLE_SIMPLE_INDEX_FILE_H_ 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_ 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const SimpleIndex::EntrySet& entry_set, 98 const SimpleIndex::EntrySet& entry_set,
99 uint64_t cache_size, 99 uint64_t cache_size,
100 const base::TimeTicks& start, 100 const base::TimeTicks& start,
101 bool app_on_background, 101 bool app_on_background,
102 const base::Closure& callback); 102 const base::Closure& callback);
103 103
104 private: 104 private:
105 friend class WrappedSimpleIndexFile; 105 friend class WrappedSimpleIndexFile;
106 106
107 // Used for cache directory traversal. 107 // Used for cache directory traversal.
108 typedef base::Callback<void (const base::FilePath&)> EntryFileCallback; 108 typedef base::Callback<void(const base::FilePath&,
jkarlin 2017/03/27 14:09:15 While we're here, change this to using EntryFileCa
Maks Orlovich 2017/03/27 15:25:44 Done.
109 base::Time last_accessed,
110 base::Time last_modified,
111 int64_t size)>
112 EntryFileCallback;
109 113
110 // When loading the entries from disk, add this many extra hash buckets to 114 // When loading the entries from disk, add this many extra hash buckets to
111 // prevent reallocation on the IO thread when merging in new live entries. 115 // prevent reallocation on the IO thread when merging in new live entries.
112 static const int kExtraSizeForMerge = 512; 116 static const int kExtraSizeForMerge = 512;
113 117
114 // Synchronous (IO performing) implementation of LoadIndexEntries. 118 // Synchronous (IO performing) implementation of LoadIndexEntries.
115 static void SyncLoadIndexEntries(net::CacheType cache_type, 119 static void SyncLoadIndexEntries(net::CacheType cache_type,
116 base::Time cache_last_modified, 120 base::Time cache_last_modified,
117 const base::FilePath& cache_directory, 121 const base::FilePath& cache_directory,
118 const base::FilePath& index_file_path, 122 const base::FilePath& index_file_path,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 static const char kIndexFileName[]; 195 static const char kIndexFileName[];
192 static const char kTempIndexFileName[]; 196 static const char kTempIndexFileName[];
193 197
194 DISALLOW_COPY_AND_ASSIGN(SimpleIndexFile); 198 DISALLOW_COPY_AND_ASSIGN(SimpleIndexFile);
195 }; 199 };
196 200
197 201
198 } // namespace disk_cache 202 } // namespace disk_cache
199 203
200 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_ 204 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/simple/simple_index_file.cc » ('j') | net/disk_cache/simple/simple_index_file.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698