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

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

Issue 2041343002: Storage manager: Show overall size information and size of Downloads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and rebase on top of https://codereview.chromium.org/1995113002. 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 bad3844a1fc8a50313a1e2657de99abcc9012297..c83851de2e7b43f37d5ab1f7eff5724ef33881e5 100644
--- a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_STORAGE_MANAGER_HANDLER_H_
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
namespace chromeos {
@@ -25,6 +26,24 @@ class StorageManagerHandler : public ::options::OptionsPageUIHandler {
void RegisterMessages() override;
private:
+ // Handlers of JS messages.
+ void HandleUpdateStorageInfo(const base::ListValue* unused_args);
+ void HandleOpenDownloads(const base::ListValue* unused_args);
+
+ // Requests updating disk space information.
+ void UpdateSizeStat();
+
+ // Callback to update the UI about disk space information.
+ void OnGetSizeStat(int64_t* total_size, int64_t* available_size);
+
+ // Requests updating the size of Downloads directory.
+ void UpdateDownloadsSize();
+
+ // Callback to update the UI about the size of Downloads directory.
+ void OnGetDownloadsSize(int64_t size);
+
+ base::WeakPtrFactory<StorageManagerHandler> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(StorageManagerHandler);
};

Powered by Google App Engine
This is Rietveld 408576698