Index: chrome/browser/android/offline_pages/offline_page_utils.h |
diff --git a/chrome/browser/android/offline_pages/offline_page_utils.h b/chrome/browser/android/offline_pages/offline_page_utils.h |
index f539f9369b54e00dd91a3ac3b010ecc440dcc744..956e939ceea6fc91339337eed6ffeee97a680228 100644 |
--- a/chrome/browser/android/offline_pages/offline_page_utils.h |
+++ b/chrome/browser/android/offline_pages/offline_page_utils.h |
@@ -9,8 +9,13 @@ |
#include "base/callback.h" |
#include "components/offline_pages/core/offline_page_model.h" |
+#include "components/offline_pages/core/offline_page_types.h" |
#include "url/gurl.h" |
+namespace base { |
+class Time; |
+} |
+ |
namespace content { |
class BrowserContext; |
class WebContents; |
@@ -114,6 +119,16 @@ class OfflinePageUtils { |
// of download resource. |
static bool CanDownloadAsOfflinePage(const GURL& url, |
const std::string& contents_mime_type); |
+ |
+ // Get total size of cache offline pages for a given time range. Returns false |
+ // when an OfflinePageModel cannot be acquired using the |browser_context|, or |
+ // the time range is invalid (|begin_time| > |end_time|). Also returning false |
+ // means no callback should be expected. |
+ static bool GetCachedOfflinePageSizeBetween( |
+ content::BrowserContext* browser_context, |
+ const SizeInBytesCallback& callback, |
+ const base::Time& begin_time, |
+ const base::Time& end_time); |
}; |
} // namespace offline_pages |