Index: components/offline_pages/core/cached_offline_page_utils.h |
diff --git a/components/offline_pages/core/cached_offline_page_utils.h b/components/offline_pages/core/cached_offline_page_utils.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..15504f379602d531683bab1b8e0809db5ca3a389 |
--- /dev/null |
+++ b/components/offline_pages/core/cached_offline_page_utils.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_OFFLINE_PAGES_CORE_CACHED_OFFLINE_PAGE_UTILS_H_ |
+#define COMPONENTS_OFFLINE_PAGES_CORE_CACHED_OFFLINE_PAGE_UTILS_H_ |
+ |
+#include "components/offline_pages/core/offline_page_types.h" |
+ |
+namespace base { |
+class Time; |
+} |
+ |
+namespace offline_pages { |
+ |
+class OfflinePageModel; |
+ |
+// A dedicated class of static methods used for all upper level cached offline |
+// pages related utility functions. For example: |
+// 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.
|
+// Delete all cached offline pages. |
+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.
|
+ public: |
+ // Get total size of cache offline pages for a given time range. |
+ static void GetCachedOfflinePageSizeBetween( |
+ OfflinePageModel* model, |
+ const SizeCalculatedCallback& callback, |
+ const base::Time& begin_time, |
+ const base::Time& end_time); |
+ |
+ // Get total size of cached offline pages. |
+ static void GetCachedOfflinePageSize(OfflinePageModel* model, |
+ const SizeCalculatedCallback& callback); |
+ |
+ // Delete all cached offline pages. |
+ static void DeleteCachedOfflinePage(OfflinePageModel* model, |
+ const DeletePageCallback& callback); |
+}; |
+ |
+} // namespace offline_pages |
+#endif // COMPONENTS_OFFLINE_PAGES_CORE_CACHED_OFFLINE_PAGE_UTILS_H_ |