Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3353)

Unified Diff: chrome/browser/android/offline_pages/offline_page_utils.h

Issue 2860573004: [Offline Pages] Add cached offline page utils and show usage in settings. (Closed)
Patch Set: address missed comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698