[Storage management] Use Spaced service for total and free disk space Use the new Spaced DBus method GetRootDeviceSize that returns the size of the disk instead of the size of the current partition. Use GetTotalDiskSpaceBlocking (statvfs) when the Spaced method above fails (e.g. when the Fake client is used), and for guest profiles where disk spaces are not relevant (in-memory temporary filesystem). Stop rounding the total disk space to the next power of 2. Refactoring: the observer StorageHandler::OnSizeCalculated is now responsible for updating the map of items sizes (storage_items_total_bytes_) and marking the correct item as calculated (calculation_state_). It then calls dedicated functions to update the UI (UpdateSizeStat, UpdateStorageItem, UpdateSystemSize). Test: unit_tests --gtest_filter=StorageHandlerTest.* Bug: b:173086361, chromium:1262859 Change-Id: I0ca5f6490bef44616ed5f743b07f010fb44c758d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3216578 Commit-Queue: Jeremie Boulic <jboulic@chromium.org> Reviewed-by: Jimmy Gong <jimmyxgong@chromium.org> Reviewed-by: Jon Mann <jonmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#934374}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.