• Saurabh Nijhara's avatar
    Handling non-critical update required for MinimumChromeVersion Policy · 839c17c1
    Saurabh Nijhara authored
    This CL adds the handling for non critical updates (warning time
    greater than to zero) for the policy MinimumChromeVersionEnforced.
    A timer is started based on the current warning time which triggers
    when the deadline is reached.
    To persist the deadline across reboots, 2 new prefs are stored in the
    local state - one for timer start time and the other for warning time.
    According to the policy requirements, the warning time for a user
    cannot decrease for good user experience.
    
    When a new policy is received and update is required, the policy
    handler calculates the new deadline using the already existing timer
    start time from the local state (if it exists). The local state is
    updated with the new pref values and a timer is started to expire when
    deadline is reached which then blocks user session. The policy handler
    also observes BuildState for any updates in Chrome version. If Chrome
    is updated before deadline, the timer is stopped and update is no
    longer required.
    
    The CL does not fully implement the policy.
    Subsequent CLs will handle other cases of this policy like showing
    in-session notifications in case of EOL and network limitations.
    
    Bug: 1048607
    Change-Id: Iddd3966a316b4f48417c3b8aeddefd70597f6799
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2189150
    Commit-Queue: Saurabh Nijhara <snijhara@google.com>
    Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
    Reviewed-by: default avatarDominic Battré <battre@chromium.org>
    Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
    Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#769923}
    839c17c1
pref_names.cc 136 KB