• Aga Wronska's avatar
    Create ConsumerStatusReportingService and move StatusUploader that is used · cd8c165e
    Aga Wronska authored
    to report child user status.
    
    ConsumerStatusReportingService is a KeyedService created for child users only.
    
    Moving StatusUploader from UserCloudPolicyManagerChromeOS helps to
    enforce that consumer status reports are only uploaded for child user.
    Additionally it simplifies DeviceStatusCollector by passing an already
    initialized pref service.
    
    Test: Run DeviceStatusCollectorTest, ConsumerDeviceCollectorTest, StatusUploaderTest,
    UserCloudPolicyManagerChromeOSTest.
    Manually add child account to device (managed/consumer) and observe status upload after ~60s.
    Manually sign in as child user to device (managed/consumer) and observe status upload after ~60s.
    Manually sign in as regular user and observe that status is not uploaded.
    Observe that enterprise reporting on managed device is not disrupted.
    
    Change-Id: Ib0ac071f96416e4c2a9ba30ce0c32a782b351bd1
    Reviewed-on: https://chromium-review.googlesource.com/1089462
    Commit-Queue: Aga Wronska <agawronska@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#569611}
    cd8c165e
device_status_collector.h 12.8 KB