• David Munro's avatar
    crostini: Fix a disk resizing bug · bff26532
    David Munro authored
    Now that we round sizes to human-friendly numbers (e.g. nearest 0.1GiB),
    and we round down the top of the range of allowed sizes, it's possible
    to end up with a disk that's allocated a legal amount, but which is
    beyond the slider range. Now we ensure that we always include whatever
    size disk the user currently has in the range.
    
    Bug: chromium:1126705
    Test: Run new unit test that hits this case.
    
    Change-Id: I7f8fb7bfe652b596da0763693699d74c6c61d39d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2459133
    Commit-Queue: David Munro <davidmunro@google.com>
    Auto-Submit: David Munro <davidmunro@google.com>
    Reviewed-by: default avatarFergus Dall <sidereal@google.com>
    Cr-Commit-Position: refs/heads/master@{#815466}
    bff26532
crostini_disk.cc 13.2 KB