• Shawn Pickett's avatar
    Only enable media battery changes when running on battery · c4e3ab82
    Shawn Pickett authored
    Bug: 984851
    
    In http://crrev.com/c/1708013, a change was committed to improve
    battery life by avoiding unnecessary media caching. This submission,
    driven by feedback from http://crbug.com/984851, makes an additional
    adjustment in preparation for testing trials.
    
    It adds a check to verify that the device is running on battery
    and is not connected to AC power. Since the goal is to improve battery
    life, this scopes the change so that it doesn't impact scenarios when
    the device is connected to power. The potential disadvantage is that
    the caching behavior can now be different depending on whether the
    device is connected or not. Since the entire change is under a feature
    key, the idea is to verify that the reduction in media caching does
    not lead to any discernible difference in user-facing functionality
    between the scenarios during the testing trials.
    
    Change-Id: I8b73da81a509962701e30cfd43f36b34b0dc70b2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1830069Reviewed-by: default avatarMaksim Orlovich <morlovich@chromium.org>
    Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
    Commit-Queue: Shawn Pickett <shawnpi@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#734104}
    c4e3ab82
http_cache_transaction.cc 126 KB