• Toni Barzic's avatar
    Show a notification when a detachable base change is detected for a user · 550419f8
    Toni Barzic authored
    Adds DetachableBaseNotificationController that observes
    DetachableBaseHandler in order to detect when a detachable base
    different than the last base used by the active user changes. When a
    detachable base change is detected, it shows a system notification.
    The notification serves a security purpose - it warns the user that
    the detachable base they are using has changed, and that the base could
    be compromised (to steal their keystrokes).
    
    Note that the notification is shown only if the session is unblocked
    at the time - lock screen and login screen will implement their own UI
    to notify the user about the base change.
    
    If/when the session is unblocked, the attached base is set as the last
    one used by the user to prevent the notification from showing up next
    time the user attaches the same base.
    
    Bug: 796300
    Change-Id: I7ff8fdf3e02e5833df2a709169fdd076285f3a4b
    Reviewed-on: https://chromium-review.googlesource.com/952477Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
    Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
    Commit-Queue: Toni Barzic <tbarzic@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#541717}
    550419f8
detachable_base_notification_controller.cc 4.93 KB