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

Unified Diff: chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h

Issue 2111043003: Storage manager: Show the disk usage of other users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set a fake size. Created 4 years, 6 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: chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h
diff --git a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h b/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h
index 655ba62ad5841ad06f16a0061b6d76191c20ad0c..332bd0913d3043bb1db4b0c2e38dba73c090133b 100644
--- a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h
@@ -9,6 +9,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
#include "components/arc/storage_manager/arc_storage_manager.h"
+#include "components/user_manager/user.h"
namespace chromeos {
namespace options {
@@ -65,6 +66,12 @@ class StorageManagerHandler : public ::options::OptionsPageUIHandler {
// Callback to update the UI about the size of browsing data.
void OnGetBrowsingDataSize(bool is_site_data, int64_t size);
+ // Requests updating the total size of other users' data.
+ void UpdateOtherUsersSize();
+
+ // Callback to save the fetched user sizes and update the UI.
+ void OnGetOtherUserSize(bool success, int64_t size);
+
// Requests updating the space size used by Android apps and cache.
void UpdateArcSize();
@@ -80,6 +87,13 @@ class StorageManagerHandler : public ::options::OptionsPageUIHandler {
// Total size of site data in browsing data.
int64_t browser_site_data_size_;
+ // The list of other users whose directory sizes will be accumulated as the
+ // size of "Other users".
+ user_manager::UserList other_users_;
+
+ // Fetched sizes of user directories.
+ std::vector<int64_t> user_sizes_;
+
base::WeakPtrFactory<StorageManagerHandler> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(StorageManagerHandler);

Powered by Google App Engine
This is Rietveld 408576698