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

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

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « net/disk_cache/simple/simple_index.cc ('k') | net/disk_cache/simple/simple_index_file.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 // Get index entries based on current disk context. 84 // Get index entries based on current disk context.
85 virtual void LoadIndexEntries(base::Time cache_last_modified, 85 virtual void LoadIndexEntries(base::Time cache_last_modified,
86 const base::Closure& callback, 86 const base::Closure& callback,
87 SimpleIndexLoadResult* out_result); 87 SimpleIndexLoadResult* out_result);
88 88
89 // Write the specified set of entries to disk. 89 // Write the specified set of entries to disk.
90 virtual void WriteToDisk(const SimpleIndex::EntrySet& entry_set, 90 virtual void WriteToDisk(const SimpleIndex::EntrySet& entry_set,
91 uint64 cache_size, 91 uint64 cache_size,
92 const base::TimeTicks& start, 92 const base::TimeTicks& start,
93 bool app_on_background); 93 bool app_on_background,
94 const base::Closure& callback);
94 95
95 private: 96 private:
96 friend class WrappedSimpleIndexFile; 97 friend class WrappedSimpleIndexFile;
97 98
98 // Used for cache directory traversal. 99 // Used for cache directory traversal.
99 typedef base::Callback<void (const base::FilePath&)> EntryFileCallback; 100 typedef base::Callback<void (const base::FilePath&)> EntryFileCallback;
100 101
101 // When loading the entries from disk, add this many extra hash buckets to 102 // When loading the entries from disk, add this many extra hash buckets to
102 // prevent reallocation on the IO thread when merging in new live entries. 103 // prevent reallocation on the IO thread when merging in new live entries.
103 static const int kExtraSizeForMerge = 512; 104 static const int kExtraSizeForMerge = 512;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 static const char kIndexFileName[]; 181 static const char kIndexFileName[];
181 static const char kTempIndexFileName[]; 182 static const char kTempIndexFileName[];
182 183
183 DISALLOW_COPY_AND_ASSIGN(SimpleIndexFile); 184 DISALLOW_COPY_AND_ASSIGN(SimpleIndexFile);
184 }; 185 };
185 186
186 187
187 } // namespace disk_cache 188 } // namespace disk_cache
188 189
189 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_ 190 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_
OLDNEW
« no previous file with comments | « net/disk_cache/simple/simple_index.cc ('k') | net/disk_cache/simple/simple_index_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698