Round total storage size to the next power of 2
On the storage management page, to have the numbers match up to the size that was advertised when the user bought the device, we round the total size to the next power of 2. The total size that was displayed on the storage page was the size of the stateful partition, by far the largest of the 12 partitions present on a ChromeOS device. The vast majority of users doesn't want to worry about these details. We want to numbers on the storage page to add up to the disk size advertized by the manufacturer, a rounded power of 2. unit_tests --gtest_filter="*StorageHandlerTest*" Test: Bug: 1056507, 1013452 Change-Id: Ie8185730183572f5f61fd8646bb9a1fe0f318d8d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2074821 Commit-Queue: Jeremie Boulic <jboulic@chromium.org> Reviewed-by:Kyle Horimoto <khorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#746567}
Showing
Please register or sign in to comment