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

Unified Diff: components/offline_pages/archive_manager.h

Issue 1988973002: [Offline pages] Moving disk size related calls to Archive Manager, reorganizing UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@archive-manager
Patch Set: Addressing feedback Created 4 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
Index: components/offline_pages/archive_manager.h
diff --git a/components/offline_pages/archive_manager.h b/components/offline_pages/archive_manager.h
index 6441d85fdc82ffe85c3641bd0e1037883d728bbf..c81499ee23e87b7423400f6c1bdfd6486bd6b45f 100644
--- a/components/offline_pages/archive_manager.h
+++ b/components/offline_pages/archive_manager.h
@@ -23,6 +23,11 @@ namespace offline_pages {
// All tasks are performed using |task_runner_|.
class ArchiveManager {
public:
+ struct StorageStats {
+ int64_t free_disk_space;
+ int64_t total_archives_size;
+ };
+
ArchiveManager(const base::FilePath& archives_dir,
const scoped_refptr<base::SequencedTaskRunner>& task_runner);
virtual ~ArchiveManager();
@@ -52,6 +57,12 @@ class ArchiveManager {
const base::Callback<void(const std::set<base::FilePath>&)>& callback)
const;
+ // Gets stats about archive storage, i.e. total archive sizes and free disk
+ // space.
+ virtual void GetStorageStats(
+ const base::Callback<void(const StorageStats& storage_sizes)>& callback)
+ const;
+
private:
// Path under which all of the managed archives should be stored.
base::FilePath archives_dir_;
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_bridge.cc ('k') | components/offline_pages/archive_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698