• Wenzhao Zang's avatar
    wallpaper refactoring: Reimplement SetPolicyWallpaper · ee8bd341
    Wenzhao Zang authored
    A few differences with the current implementation:
    
    1) Currently there're both |WallpaperManager::OnPolicySet| and
       |OnPolicyFetched|. |OnPolicySet| merely labels the wallpaper
       as POLICY type to prevent potential wallpaper changes. This results
       in a temporary inconsistency between the actual wallpaper and its
       type. In this version this method is deleted. (ie, if policy fetch
       never succeeds, WallpaperController won't know about the policy.)
    
    2) Currently |OnPolicyCleared| only sets the type back to DEFAULT
       without deleting the policy wallpaper file. This doesn't result in
       visible bugs, but it's better to delete the files and explicitly
       calls SetDefaultWallpaper for this user.
    
    3) The existing tests in wallpaper_manager_policy_browsertest.cc stay
       unchanged in this CL. But they may be moved to a different place
       later.
    
    Test: Verified on Admin console, no conflict with device policy.
    Bug: 779221, 800182
    Change-Id: Ibb3fa38ddc19b095bfd684fe2fa6e500d7a580b4
    Reviewed-on: https://chromium-review.googlesource.com/845262Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
    Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#531301}
    ee8bd341
wallpaper_controller.h 27.4 KB