Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Issue 2734783007: Update scheme text color in Omnibox only in non-default Security Levels (Closed)

Created:
3 years, 9 months ago by elawrence
Modified:
3 years, 9 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, jdonnelly+watch_chromium.org, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update scheme text color in Omnibox only in non-default Security Levels A recent refactoring dropped a test from the conditional which caused the Omnibox to paint the scheme text in black in cases where it should not. Restore the conditional so that the Omnibox only colors the scheme text in the correct scenarios. BUG=699222 TEST=Type about:blank in the omnibox and hit enter. "about:" should be grey and "blank" should be black Review-Url: https://codereview.chromium.org/2734783007 Cr-Commit-Position: refs/heads/master@{#455783} Committed: https://chromium.googlesource.com/chromium/src/+/f079e7398cefd26400234c38a83630d2f5730969

Patch Set 1 #

Total comments: 2

Patch Set 2 : More closely match OS X #

Patch Set 3 : Update comment #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -5 lines) Patch
M chrome/browser/ui/views/omnibox/omnibox_view_views.cc View 1 2 1 chunk +10 lines, -5 lines 1 comment Download

Messages

Total messages: 16 (8 generated)
elawrence
PTAL?
3 years, 9 months ago (2017-03-07 20:22:02 UTC) #2
Peter Kasting
Seems like the test suite should be expanded to catch this (though maybe you're waiting ...
3 years, 9 months ago (2017-03-08 03:05:44 UTC) #7
elawrence
Thanks for the quick feedback! > Seems like the test suite should be expanded to ...
3 years, 9 months ago (2017-03-08 17:23:03 UTC) #8
Peter Kasting
LGTM. If you're confident about the behavior change question I have below, go ahead and ...
3 years, 9 months ago (2017-03-09 06:02:42 UTC) #9
elawrence
> I am not telling you you have to do something one way or another, ...
3 years, 9 months ago (2017-03-09 16:53:26 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2734783007/40001
3 years, 9 months ago (2017-03-09 16:54:09 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/f079e7398cefd26400234c38a83630d2f5730969
3 years, 9 months ago (2017-03-09 17:36:32 UTC) #15
Peter Kasting
3 years, 9 months ago (2017-03-09 18:21:40 UTC) #16
Message was sent while issue was closed.
On 2017/03/09 16:53:26, elawrence wrote:
> Long block of text:
> HTTP_SHOW_WARNING might've been better named WARN_USER_PAGE_NOT_SECURE or
> something, as it's not really about HTTP, it's about the fact that we detected
> something about the URL or content on the page that makes us nervous and we
want
> to show the "NOT SECURE" warning in the security chip. 
> 
> That "NOT SECURE" security chip state is NOT expected to affect the visual
> display of the URL scheme, and in the dominant case (HTTP) it does not because
> we don't display the HTTP scheme text in the omnibox. 
> 
> Similarly, we also show "NOT SECURE" for ALL data: urls, and we don't want
that
> to impact the fact that we emphasize the scheme in the URL. The prior omission
> of the quick exit for HTTP_SHOW_WARNING didn't result in a visible behavior
> change because the SetEmphasis() function painted the data scheme in black and
> then the UpdateSchemeStyle() function would then get called and paint the
scheme
> in black again.
> 
> In the future, if we were to introduce a NOT SECURE warning on, say, about:
> pages that contain sensitive forms, omitting the quick exit for
> HTTP_SHOW_WARNING would result in incorrect behavior because we would end up
> painting the scheme in black instead of grey.

This is a super-awesome explanation.  It addresses the idea that some security
states are more like a "mode" and some more like an "attribute on another mode".

I would love to see a bunch of this captured in the comment in the code there,
since it really gets at the "why" of that early exit in the way I was hoping to
understand.

Powered by Google App Engine
This is Rietveld 408576698