xref: /aosp_15_r20/external/cronet/net/disk_cache/simple/simple_index_delegate.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2013 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_DELEGATE_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_DELEGATE_H_
7 
8 #include <stdint.h>
9 
10 #include <vector>
11 
12 #include "net/base/completion_once_callback.h"
13 #include "net/base/net_export.h"
14 
15 namespace disk_cache {
16 
17 class NET_EXPORT_PRIVATE SimpleIndexDelegate {
18  public:
19   virtual ~SimpleIndexDelegate() = default;
20 
21   // Dooms all entries in |entries|, calling |callback| with the result
22   // asynchronously. |entries| is mutated in an undefined way by this call,
23   // for efficiency.
24   virtual void DoomEntries(std::vector<uint64_t>* entry_hashes,
25                            net::CompletionOnceCallback callback) = 0;
26 };
27 
28 }  // namespace disk_cache
29 
30 #endif  // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_DELEGATE_H_
31