| 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_
|
|
|