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 COMPONENTS_OFFLINE_PAGES_CORE_CACHED_OFFLINE_PAGE_UTILS_H_ | |
6 #define COMPONENTS_OFFLINE_PAGES_CORE_CACHED_OFFLINE_PAGE_UTILS_H_ | |
7 | |
8 #include "components/offline_pages/core/offline_page_types.h" | |
9 | |
10 namespace base { | |
11 class Time; | |
12 } | |
13 | |
14 namespace offline_pages { | |
15 | |
16 class OfflinePageModel; | |
17 | |
18 // A dedicated class of static methods used for all upper level cached offline | |
19 // pages related utility functions. For example: | |
20 // Get total size of all cached offline pages. | |
carlosk
2017/05/03 18:13:52
nit: add a bullet symbol to these lines like a "*"
romax
2017/05/03 19:46:21
Done.
| |
21 // Delete all cached offline pages. | |
22 class CachedOfflinePageUtils { | |
carlosk
2017/05/03 18:13:52
It seems to be more common in Chromium to use non-
romax
2017/05/03 19:46:21
Done.
| |
23 public: | |
24 // Get total size of cache offline pages for a given time range. | |
25 static void GetCachedOfflinePageSizeBetween( | |
26 OfflinePageModel* model, | |
27 const SizeCalculatedCallback& callback, | |
28 const base::Time& begin_time, | |
29 const base::Time& end_time); | |
30 | |
31 // Get total size of cached offline pages. | |
32 static void GetCachedOfflinePageSize(OfflinePageModel* model, | |
33 const SizeCalculatedCallback& callback); | |
34 | |
35 // Delete all cached offline pages. | |
36 static void DeleteCachedOfflinePage(OfflinePageModel* model, | |
37 const DeletePageCallback& callback); | |
38 }; | |
39 | |
40 } // namespace offline_pages | |
41 #endif // COMPONENTS_OFFLINE_PAGES_CORE_CACHED_OFFLINE_PAGE_UTILS_H_ | |
OLD | NEW |