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

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

Issue 2123133002: Storage manager: Add site data size on the amount of browsing data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use 2 ints and 2 bools to track fetched browsing data size. Created 4 years, 5 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/ui/webui/options/chromeos/storage_manager_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c6e1629ba246801caa905d954fdc57b6db53c207..610394817d2bd2159b9bcfbe19e883e12151dc0e 100644
--- a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h
@@ -7,10 +7,12 @@
#include <stdint.h>
+#include <memory>
#include <vector>
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/browsing_data/site_data_size_collector.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"
@@ -88,9 +90,15 @@ class StorageManagerHandler : public ::options::OptionsPageUIHandler {
// Total size of cache data in browsing data.
int64_t browser_cache_size_;
+ // True if we have already received the size of http cache.
+ bool has_browser_cache_size_;
+
// Total size of site data in browsing data.
int64_t browser_site_data_size_;
+ // True if we have already received the size of site data.
+ bool has_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_;
@@ -98,6 +106,9 @@ class StorageManagerHandler : public ::options::OptionsPageUIHandler {
// Fetched sizes of user directories.
std::vector<int64_t> user_sizes_;
+ // Helper to compute the total size of all types of site date.
+ std::unique_ptr<SiteDataSizeCollector> site_data_size_collector_;
+
base::WeakPtrFactory<StorageManagerHandler> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(StorageManagerHandler);
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698