wallpaper refactoring: Reimplement SetPolicyWallpaper
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:Mitsuru Oshima <oshima@chromium.org> Reviewed-by:
Daniel Cheng <dcheng@chromium.org> Reviewed-by:
Xiaoqian Dai <xdai@chromium.org> Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org> Cr-Commit-Position: refs/heads/master@{#531301}
Showing
Please register or sign in to comment