OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
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 CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_ | |
6 #define CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_ | |
7 | |
8 #include "base/callback_forward.h" | |
9 #include "base/time/time.h" | |
10 #include "content/common/content_export.h" | |
11 | |
12 class GURL; | |
13 | |
14 namespace content { | |
15 | |
16 class StoragePartition; | |
17 | |
18 class CONTENT_EXPORT StoragePartitionHttpCacheDataRemover { | |
Mike West
2017/03/20 11:03:37
Adding this to //content/public seems like overkil
| |
19 public: | |
20 // Creates a StoragePartitionHttpCacheDataRemover that deletes cache entries | |
21 // in the time range between |delete_begin| (inclusively) and |delete_end| | |
22 // (exclusively). | |
23 static StoragePartitionHttpCacheDataRemover* CreateForRange( | |
24 content::StoragePartition* storage_partition, | |
25 base::Time delete_begin, | |
26 base::Time delete_end); | |
27 | |
28 // Similar to CreateForRange(), but only deletes URLs that are matched by | |
29 // |url_predicate|. Note that the deletion with URL filtering is not built in | |
30 // to the cache interface and might be slower. | |
31 static StoragePartitionHttpCacheDataRemover* CreateForURLsAndRange( | |
32 content::StoragePartition* storage_partition, | |
33 const base::Callback<bool(const GURL&)>& url_predicate, | |
34 base::Time delete_begin, | |
35 base::Time delete_end); | |
36 | |
37 // Calls |done_callback| upon completion and also destroys itself. | |
38 virtual void Remove(const base::Closure& done_callback) = 0; | |
39 }; | |
40 | |
41 } // namespace content | |
42 | |
43 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_ | |
OLD | NEW |