|
|
Chromium Code Reviews
DescriptionShow HTTP-Bad security chip UI on Mac and Views
This hooks up the HTTP_SHOW_WARNING state to the security chip in the
omnibox on Mac and Views.
(Note that this will only display if the #mark-non-secure-as flag is
set, since the SecurityStateModel only emits HTTP_SHOW_WARNING when the
flag is set appropriately.)
BUG=647562
Committed: https://crrev.com/de79182ad7338200103842786ab2260e3ab74df3
Cr-Commit-Position: refs/heads/master@{#426033}
Patch Set 1 #Patch Set 2 : Add Mac #
Total comments: 6
Patch Set 3 : Formatting changes for pkasting #Patch Set 4 : Fix typo #
Messages
Total messages: 35 (23 generated)
The CQ bit was checked by felt@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by felt@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Show HTTP-Bad security chip UI on Views This hooks up the HTTP_SHOW_WARNING state to the security chip in the omnibox on Views. BUG= ========== to ========== Show HTTP-Bad security chip UI on Mac and Views This hooks up the HTTP_SHOW_WARNING state to the security chip in the omnibox on Mac and Views. BUG= ==========
Description was changed from ========== Show HTTP-Bad security chip UI on Mac and Views This hooks up the HTTP_SHOW_WARNING state to the security chip in the omnibox on Mac and Views. BUG= ========== to ========== Show HTTP-Bad security chip UI on Mac and Views This hooks up the HTTP_SHOW_WARNING state to the security chip in the omnibox on Mac and Views. (Note that this will only display if the #mark-non-secure-as flag is set, since the SecurityStateModel only emits HTTP_SHOW_WARNING when the flag is set appropriately.) BUG=647562 ==========
felt@chromium.org changed reviewers: + spqchan@chromium.org
spqchan@, could you please review?
lgtm
lgtm lgtm
felt@chromium.org changed reviewers: + pkasting@chromium.org
pkasting, PTAL?
LGTM https://codereview.chromium.org/2422303002/diff/20001/chrome/browser/ui/views... File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/2422303002/diff/20001/chrome/browser/ui/views... chrome/browser/ui/views/location_bar/location_bar_view.cc:829: security_level == security_state::SecurityStateModel::HTTP_SHOW_WARNING) Hmm, should SHOW_WARNING really use the text color, and not a security text color (which would presumably be red)? https://codereview.chromium.org/2422303002/diff/20001/chrome/browser/ui/views... chrome/browser/ui/views/location_bar/location_bar_view.cc:1023: level == SecurityLevel::HTTP_SHOW_WARNING; Nit: Shorter, and seems more readable: using SecurityLevel = security_state::SecurityStateModel::SecurityLevel; const SecurityLevel level = GetToolbarModel()->GetSecurityLevel(false); if (level == SecurityLevel::SECURE || level == SecurityLevel::EV_SECURE) return should_show_secure_state_; return level == SecurityLevel::DANGEROUS || level == SecurityLevel::HTTP_SHOW_WARNING; https://codereview.chromium.org/2422303002/diff/20001/chrome/browser/ui/views... chrome/browser/ui/views/location_bar/location_bar_view.cc:1035: (is_secure_level && should_animate_secure_state_)); Nit: Feels more readable to me, and is parallel to my suggestion above: if (!ShouldShowSecurityChip()) return false; using SecurityLevel = security_state::SecurityStateModel::SecurityLevel; const SecurityLevel level = GetToolbarModel()->GetSecurityLevel(false); if (level == SecurityLevel::EV_SECURE || level == SecurityLevel::SECURE) return should_animate_secure_state_; return should_animate_nonsecure_state_ && (level == SecurityLevel::DANGEROUS || level == SecurityLevel::HTTP_SHOW_WARNING); You might not need the first conditional at all, depending on how callers call these two functions. (If "animate when showing" is orthogonal to "showing to begin with", you can get away with not having it.)
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by felt@chromium.org to run a CQ dry run
https://codereview.chromium.org/2422303002/diff/20001/chrome/browser/ui/views... File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/2422303002/diff/20001/chrome/browser/ui/views... chrome/browser/ui/views/location_bar/location_bar_view.cc:829: security_level == security_state::SecurityStateModel::HTTP_SHOW_WARNING) On 2016/10/17 20:56:39, Peter Kasting wrote: > Hmm, should SHOW_WARNING really use the text color, and not a security text > color (which would presumably be red)? That's correct. It intentionally is set to show as the text color and not as red, as per specs. It's meant to be a mild warning. https://codereview.chromium.org/2422303002/diff/20001/chrome/browser/ui/views... chrome/browser/ui/views/location_bar/location_bar_view.cc:1023: level == SecurityLevel::HTTP_SHOW_WARNING; On 2016/10/17 20:56:39, Peter Kasting wrote: > Nit: Shorter, and seems more readable: > > using SecurityLevel = security_state::SecurityStateModel::SecurityLevel; > const SecurityLevel level = GetToolbarModel()->GetSecurityLevel(false); > if (level == SecurityLevel::SECURE || level == SecurityLevel::EV_SECURE) > return should_show_secure_state_; > return level == SecurityLevel::DANGEROUS || > level == SecurityLevel::HTTP_SHOW_WARNING; Done. https://codereview.chromium.org/2422303002/diff/20001/chrome/browser/ui/views... chrome/browser/ui/views/location_bar/location_bar_view.cc:1035: (is_secure_level && should_animate_secure_state_)); On 2016/10/17 20:56:39, Peter Kasting wrote: > Nit: Feels more readable to me, and is parallel to my suggestion above: > > if (!ShouldShowSecurityChip()) > return false; > > using SecurityLevel = security_state::SecurityStateModel::SecurityLevel; > const SecurityLevel level = GetToolbarModel()->GetSecurityLevel(false); > if (level == SecurityLevel::EV_SECURE || level == SecurityLevel::SECURE) > return should_animate_secure_state_; > return should_animate_nonsecure_state_ && > (level == SecurityLevel::DANGEROUS || > level == SecurityLevel::HTTP_SHOW_WARNING); > > You might not need the first conditional at all, depending on how callers call > these two functions. (If "animate when showing" is orthogonal to "showing to > begin with", you can get away with not having it.) Done.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
felt@chromium.org changed reviewers: + rohitrao@chromium.org
rohitrao@chromium.org, PTAL as an OWNERS reviewer for Mac?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-ge...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by felt@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM but does OmniboxViewMac::GetSecureTextColor() need to be updated to handle the new enum value (and color it as grey)?
On 2016/10/18 13:05:48, rohitrao wrote: > LGTM but does OmniboxViewMac::GetSecureTextColor() need to be updated to handle > the new enum value (and color it as grey)? GetSecureTextColor shouldn't be reachable for either HTTP or HTTP_SHOW_WARNING. It's only meant for coloring the scheme for secure sites. There's an existing check in OmniboxViewMac::ApplyTextAttributes that accounts for HTTP_SHOW_WARNING before GetSecureTextColor is invoked.
The CQ bit was checked by felt@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from spqchan@chromium.org, pkasting@chromium.org Link to the patchset: https://codereview.chromium.org/2422303002/#ps60001 (title: "Fix typo")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Show HTTP-Bad security chip UI on Mac and Views This hooks up the HTTP_SHOW_WARNING state to the security chip in the omnibox on Mac and Views. (Note that this will only display if the #mark-non-secure-as flag is set, since the SecurityStateModel only emits HTTP_SHOW_WARNING when the flag is set appropriately.) BUG=647562 ========== to ========== Show HTTP-Bad security chip UI on Mac and Views This hooks up the HTTP_SHOW_WARNING state to the security chip in the omnibox on Mac and Views. (Note that this will only display if the #mark-non-secure-as flag is set, since the SecurityStateModel only emits HTTP_SHOW_WARNING when the flag is set appropriately.) BUG=647562 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Show HTTP-Bad security chip UI on Mac and Views This hooks up the HTTP_SHOW_WARNING state to the security chip in the omnibox on Mac and Views. (Note that this will only display if the #mark-non-secure-as flag is set, since the SecurityStateModel only emits HTTP_SHOW_WARNING when the flag is set appropriately.) BUG=647562 ========== to ========== Show HTTP-Bad security chip UI on Mac and Views This hooks up the HTTP_SHOW_WARNING state to the security chip in the omnibox on Mac and Views. (Note that this will only display if the #mark-non-secure-as flag is set, since the SecurityStateModel only emits HTTP_SHOW_WARNING when the flag is set appropriately.) BUG=647562 Committed: https://crrev.com/de79182ad7338200103842786ab2260e3ab74df3 Cr-Commit-Position: refs/heads/master@{#426033} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/de79182ad7338200103842786ab2260e3ab74df3 Cr-Commit-Position: refs/heads/master@{#426033} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
