Fix bug for emphasizing https scheme for Chrome Home
The recent change for using ColorUtils.isUsingDefaultToolbarColor to decide emphazing htts scheme makes Chrome Home does not emphasize https properly. This is because ColorUtils.isUsingDefaultToolbarColor does not check whether BottomSheet is null. For Chrome Home, BottomSheet is not null so the toolbar should not be populated by brand color and should emphasize the https scheme. To fix the problem, revert back to use ToolbarModel.isUsingBrandColor. And also change CCT to use the same method. However, since mIsUsingBrandColor also depends of whether there is a tab, make setTab in ToolbarModelImpl also update mIsUsingBrandColor. This is needed because CCT setTab after setPrimaryColor. BUG=771559 Change-Id: Id94c811f2992ecc73b36c08d2537c63949131f2e Reviewed-on: https://chromium-review.googlesource.com/701455Reviewed-by:Yusuf Ozuysal <yusufo@chromium.org> Reviewed-by:
Matthew Jones <mdjones@chromium.org> Commit-Queue: Lei Tian <ltian@google.com> Cr-Commit-Position: refs/heads/master@{#506806}
Showing
Please register or sign in to comment