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

Unified Diff: components/offline_pages/core/cached_offline_page_utils.h

Issue 2860573004: [Offline Pages] Add cached offline page utils and show usage in settings. (Closed)
Patch Set: comments from carlosk@. Created 3 years, 8 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
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..c7dd34166a9a4b49424045ac74b024d2a12680f9
--- /dev/null
+++ b/components/offline_pages/core/cached_offline_page_utils.h
@@ -0,0 +1,29 @@
+// 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 file of static methods used for all upper level cached offline
+// pages related utility functions. For example:
+// - Get total size of all cached offline pages.
+
+// Get total size of cache offline pages for a given time range.
+void GetCachedOfflinePageSizeBetween(OfflinePageModel* model,
dewittj 2017/05/03 21:40:51 It might be better to move this to //components/of
romax 2017/05/04 04:20:36 Done. I'm adding these into offline_page_utils the
+ const SizeCalculatedCallback& callback,
+ const base::Time& begin_time,
dewittj 2017/05/03 21:40:51 nit: #include "base/time/time.h"
romax 2017/05/04 04:20:36 I thought a forward declaration would be enough?
+ const base::Time& end_time);
+
+} // namespace offline_pages
+#endif // COMPONENTS_OFFLINE_PAGES_CORE_CACHED_OFFLINE_PAGE_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698