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

Unified Diff: chrome/browser/ui/webui/settings/chromeos/device_storage_handler.h

Issue 2348913002: Port storage manager to MD settings. (Closed)
Patch Set: Address review comments 2. Created 4 years, 2 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 | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/chromeos/device_storage_handler.h
diff --git a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h b/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.h
similarity index 76%
copy from chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h
copy to chrome/browser/ui/webui/settings/chromeos/device_storage_handler.h
index a02dd36f529f74517728ab8a38d6eae6fb002317..8a0dabbb59c8195afbe8b47b2767db6b239db442 100644
--- a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h
+++ b/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_STORAGE_MANAGER_HANDLER_H_
-#define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_STORAGE_MANAGER_HANDLER_H_
+#ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_STORAGE_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_STORAGE_HANDLER_H_
#include <stdint.h>
@@ -13,33 +13,30 @@
#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 "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
#include "components/arc/storage_manager/arc_storage_manager.h"
#include "components/user_manager/user.h"
namespace chromeos {
-namespace options {
+namespace settings {
-// Storage manager overlay page UI handler.
-class StorageManagerHandler : public ::options::OptionsPageUIHandler {
+class StorageHandler : public ::settings::SettingsPageUIHandler {
public:
// Enumeration for device state about remaining space. These values must be
- // kept in sync with options.StorageSpaceState in JS code.
+ // kept in sync with settings.StorageSpaceState in JS code.
enum StorageSpaceState {
STORAGE_SPACE_NORMAL = 0,
STORAGE_SPACE_LOW = 1,
STORAGE_SPACE_CRITICALLY_LOW = 2,
};
- StorageManagerHandler();
- ~StorageManagerHandler() override;
+ StorageHandler();
+ ~StorageHandler() override;
- // OptionsPageUIHandler implementation.
- void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
- void InitializePage() override;
-
- // WebUIMessageHandler implementation.
+ // SettingsPageUIHandler implementation.
void RegisterMessages() override;
+ void OnJavascriptAllowed() override {}
+ void OnJavascriptDisallowed() override {}
private:
// Handlers of JS messages.
@@ -79,10 +76,10 @@ class StorageManagerHandler : public ::options::OptionsPageUIHandler {
void OnGetOtherUserSize(bool success, int64_t size);
// Requests updating the space size used by Android apps and cache.
- void UpdateArcSize();
+ void UpdateAndroidSize();
// Callback to update the UI about Android apps and cache.
- void OnGetArcSize(bool succeeded, arc::mojom::ApplicationsSizePtr size);
+ void OnGetAndroidSize(bool succeeded, arc::mojom::ApplicationsSizePtr size);
// Callback called when clearing Drive cache is done.
void OnClearDriveCacheDone(bool success);
@@ -113,15 +110,13 @@ class StorageManagerHandler : public ::options::OptionsPageUIHandler {
bool updating_downloads_size_;
bool updating_drive_cache_size_;
bool updating_browsing_data_size_;
- bool updating_arc_size_;
+ bool updating_android_size_;
bool updating_other_users_size_;
- base::WeakPtrFactory<StorageManagerHandler> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(StorageManagerHandler);
+ DISALLOW_COPY_AND_ASSIGN(StorageHandler);
};
-} // namespace options
+} // namespace settings
} // namespace chromeos
-#endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_STORAGE_MANAGER_HANDLER_H_
+#endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DEVICE_STORAGE_HANDLER_H_
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698