• Matt Reynolds's avatar
    Revert "Move WifiPollingPolicy to a global instance" · 1694bd20
    Matt Reynolds authored
    This reverts commit 29212f31.
    
    Reason for revert: Crashing on Canary builds, see crbug.com/798987
    
    Original change's description:
    > Move WifiPollingPolicy to a global instance
    > 
    > The WifiPollingPolicy controls how frequently the network location
    > provider will initiate Wi-Fi scans. Previously, the policy was attached
    > to the WifiDataProvider, which is destroyed when there are no active
    > geolocation API calls. Destruction of the provider causes us to lose track
    > of our polling policy.
    > 
    > The policy allows the first scan to be performed immediately and schedules
    > subsequent scans at regular intervals. When the provider is destroyed and
    > recreated rapidly it considers each scan to be "first", which allows many
    > Wi-Fi scans to be performed in a short window.
    > 
    > This change moves the policy state to a global instance so it can be saved
    > when the provider is destroyed and recreated. The new policy allows the
    > first-ever scan to be performed immediately, and subsequent scans may also
    > be performed immediately if enough time has lapsed since the previous scan.
    > In all other situations, the configured polling interval is enforced.
    > 
    > BUG=764954
    > 
    > Change-Id: I00649dde2a707127e53e0330511172fef4a43471
    > Reviewed-on: https://chromium-review.googlesource.com/834988
    > Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
    > Reviewed-by: Reilly Grant <reillyg@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#526782}
    
    TBR=reillyg@chromium.org,mattreynolds@chromium.org
    
    Change-Id: I25d5596418df55e9de9e0f09e6ba7546b54551a4
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Bug: 764954
    Reviewed-on: https://chromium-review.googlesource.com/851132Reviewed-by: default avatarMatt Reynolds <mattreynolds@chromium.org>
    Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#527058}
    1694bd20
wifi_data_provider_chromeos.h 1.89 KB