[Material] Update Material Security Verbose Decoration Flag
- Removed "Material" from the flag's name
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682
Committed: https://crrev.com/d52dccd7192814d740a8bae50fcd32eb00816ce4
Cr-Commit-Position: refs/heads/master@{#424917}
Description was changed from ========== [Material][Mac] Update Material Security Verbose Decoration Flag - Added the ...
4 years, 2 months ago
(2016-09-30 23:10:50 UTC)
#1
Description was changed from
==========
[Material][Mac] Update Material Security Verbose Decoration Flag
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=
==========
to
==========
[Material][Mac] Update Material Security Verbose Decoration Flag
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682
==========
4 years, 2 months ago
(2016-09-30 23:16:52 UTC)
#3
PTAL
spqchan
On 2016/09/30 23:16:52, spqchan wrote: > PTAL Sorry, please hold the CL. Need to add ...
4 years, 2 months ago
(2016-09-30 23:32:24 UTC)
#4
On 2016/09/30 23:16:52, spqchan wrote:
> PTAL
Sorry, please hold the CL. Need to add a few more things
spqchan
Description was changed from ========== [Material][Mac] Update Material Security Verbose Decoration Flag - Added the ...
4 years, 2 months ago
(2016-10-03 18:36:26 UTC)
#5
Description was changed from
==========
[Material][Mac] Update Material Security Verbose Decoration Flag
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682
==========
to
==========
[Material] Update Material Security Verbose Decoration Flag
- Removed "Material" from the flag's name
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682
==========
PTAL rsesek - for the cocoa code krb - for the changes in Views and ...
4 years, 2 months ago
(2016-10-03 18:37:48 UTC)
#7
PTAL
rsesek - for the cocoa code
krb - for the changes in Views and the flag name
Thanks!
Kevin Bailey
Not sure if you were ready, but I saw the enum get fixed. https://codereview.chromium.org/2378623007/diff/60001/chrome/browser/ui/views/location_bar/location_bar_view.cc File ...
4 years, 2 months ago
(2016-10-04 15:10:17 UTC)
#8
4 years, 2 months ago
(2016-10-04 17:16:52 UTC)
#9
cocoa/ LGTM
spqchan
PTAL https://codereview.chromium.org/2378623007/diff/60001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/2378623007/diff/60001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode784 chrome/browser/ui/views/location_bar/location_bar_view.cc:784: bool should_show = ShouldShowSecurityChip(); On 2016/10/04 15:10:17, Kevin ...
4 years, 2 months ago
(2016-10-05 01:39:49 UTC)
#10
PTAL
https://codereview.chromium.org/2378623007/diff/60001/chrome/browser/ui/views...
File chrome/browser/ui/views/location_bar/location_bar_view.cc (right):
https://codereview.chromium.org/2378623007/diff/60001/chrome/browser/ui/views...
chrome/browser/ui/views/location_bar/location_bar_view.cc:784: bool should_show
= ShouldShowSecurityChip();
On 2016/10/04 15:10:17, Kevin Bailey wrote:
> You'll need Peter's approval for this file, but speaking for myself, I would
add
> a 'bool* should_animate' parameter to ShouldShowSecurityChip() and push this
> logic down there. '!contents' can remain here.
Sounds good, I'll add pkasting. I wanted to get a pass from you first. I added
the param. I'm not too sure about about it since ShouldShowSecurityChip also
gets called with GetPreferredSize(), in which is doesn't need to know if it's
animating or not, but I don't have strong feelings about it.
4 years, 2 months ago
(2016-10-06 16:59:13 UTC)
#11
On 2016/10/05 01:39:49, spqchan wrote:
> PTAL
>
>
https://codereview.chromium.org/2378623007/diff/60001/chrome/browser/ui/views...
> File chrome/browser/ui/views/location_bar/location_bar_view.cc (right):
>
>
https://codereview.chromium.org/2378623007/diff/60001/chrome/browser/ui/views...
> chrome/browser/ui/views/location_bar/location_bar_view.cc:784: bool
should_show
> = ShouldShowSecurityChip();
> On 2016/10/04 15:10:17, Kevin Bailey wrote:
> > You'll need Peter's approval for this file, but speaking for myself, I would
> add
> > a 'bool* should_animate' parameter to ShouldShowSecurityChip() and push this
> > logic down there. '!contents' can remain here.
>
> Sounds good, I'll add pkasting. I wanted to get a pass from you first. I added
> the param. I'm not too sure about about it since ShouldShowSecurityChip also
> gets called with GetPreferredSize(), in which is doesn't need to know if it's
> animating or not, but I don't have strong feelings about it.
ping
Kevin Bailey
Sorry, didn't see the change go by. Looks good to me. I agree the 'nullptr' ...
4 years, 2 months ago
(2016-10-06 17:23:23 UTC)
#12
Sorry, didn't see the change go by. Looks good to me. I agree the 'nullptr' is a
bit odd, but I like the way that 'ShouldShowSecurityChip()' bundles things up.
spqchan
On 2016/10/06 17:23:23, Kevin Bailey wrote: > Sorry, didn't see the change go by. Looks ...
4 years, 2 months ago
(2016-10-06 23:12:33 UTC)
#13
On 2016/10/06 17:23:23, Kevin Bailey wrote:
> Sorry, didn't see the change go by. Looks good to me. I agree the 'nullptr' is
a
> bit odd, but I like the way that 'ShouldShowSecurityChip()' bundles things up.
Thanks! It looks like pkasting is OOO until Oct 9. Do you have an alternate goto
reviewer? Otherwise, I can go through owners list
spqchan
Description was changed from ========== [Material] Update Material Security Verbose Decoration Flag - Removed "Material" ...
4 years, 2 months ago
(2016-10-07 00:31:05 UTC)
#14
Description was changed from
==========
[Material] Update Material Security Verbose Decoration Flag
- Removed "Material" from the flag's name
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682
==========
to
==========
[Material] Update Material Security Verbose Decoration Flag
- Removed "Material" from the flag's name
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682, 653602
==========
Kevin Bailey
On 2016/10/06 23:12:33, spqchan wrote: > On 2016/10/06 17:23:23, Kevin Bailey wrote: > > Sorry, ...
4 years, 2 months ago
(2016-10-07 01:34:42 UTC)
#15
On 2016/10/06 23:12:33, spqchan wrote:
> On 2016/10/06 17:23:23, Kevin Bailey wrote:
> > Sorry, didn't see the change go by. Looks good to me. I agree the 'nullptr'
is
> a
> > bit odd, but I like the way that 'ShouldShowSecurityChip()' bundles things
up.
>
> Thanks! It looks like pkasting is OOO until Oct 9. Do you have an alternate
goto
> reviewer? Otherwise, I can go through owners list
Sorry, no, Peter owns views/location_bar. msw and sky own views/, or just wait
until Mon.
spqchan
On 2016/10/07 01:34:42, Kevin Bailey wrote: > On 2016/10/06 23:12:33, spqchan wrote: > > On ...
4 years, 2 months ago
(2016-10-07 18:10:11 UTC)
#16
On 2016/10/07 01:34:42, Kevin Bailey wrote:
> On 2016/10/06 23:12:33, spqchan wrote:
> > On 2016/10/06 17:23:23, Kevin Bailey wrote:
> > > Sorry, didn't see the change go by. Looks good to me. I agree the
'nullptr'
> is
> > a
> > > bit odd, but I like the way that 'ShouldShowSecurityChip()' bundles things
> up.
> >
> > Thanks! It looks like pkasting is OOO until Oct 9. Do you have an alternate
> goto
> > reviewer? Otherwise, I can go through owners list
>
> Sorry, no, Peter owns views/location_bar. msw and sky own views/, or just wait
> until Mon.
I see, thanks for letting me know! I'll wait until Monday then
4 years, 2 months ago
(2016-10-07 18:10:28 UTC)
#18
PTAL
spqchan
+pkasting for Views
4 years, 2 months ago
(2016-10-07 18:11:08 UTC)
#19
+pkasting for Views
Peter Kasting
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/views/location_bar/location_bar_view.h File chrome/browser/ui/views/location_bar/location_bar_view.h (right): https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/views/location_bar/location_bar_view.h#newcode329 chrome/browser/ui/views/location_bar/location_bar_view.h:329: // should_animate is not null, then set the value ...
4 years, 2 months ago
(2016-10-10 21:39:21 UTC)
#20
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/view...
File chrome/browser/ui/views/location_bar/location_bar_view.h (right):
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/view...
chrome/browser/ui/views/location_bar/location_bar_view.h:329: // should_animate
is not null, then set the value to true if the chip should
Nit: "...|should_animate| is non-null, sets it to whether the chip should be
animated."
(Adds ||, changes imperative to declarative verb, shortens)
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/view...
chrome/browser/ui/views/location_bar/location_bar_view.h:331: bool
ShouldShowSecurityChip(bool* should_animate) const;
I think it might make more sense to have separate ShouldShowSecurityChip() and
ShouldAnimateSecurityChip() functions.
Semantically, I'm not really a big fan of functions that are named ComputeXXX()
and then take an outparam that is set to the result of some computation YYY that
is different from XXX. I realize that it doesn't make sense to animate
something that isn't showing, but that just means the second function can be
implemented in terms of the first. (We need not be more clever about reducing
duplicated work, since ShouldShow is simple to compute and won't be a perf
bottleneck.)
This would allow callers to avoid passing nullptr to signal that they don't
care, and let the caller that does care just do:
location_icon_view_->SetSecurityState(
ShouldShowSecurityChip(), !contents && ShouldAnimateSecurityChip());
...no temps needed.
https://codereview.chromium.org/2378623007/diff/120001/chrome/common/chrome_s...
File chrome/common/chrome_switches.h (right):
https://codereview.chromium.org/2378623007/diff/120001/chrome/common/chrome_s...
chrome/common/chrome_switches.h:191: extern const char
kSecurityVerboseDecorationShowAllWithOnlyNonSecureAnimated[];
Nit: This name is kinda reaching ridiculous length. It's resulting in crazy
wrapping at usage sites. Let's look for shorter names.
One improvement would be to say SecurityChip in place of
SecurityVerboseDecoration. Neither is terribly meaningful on its own, but the
former is the language we use in various comments and email threads.
Another might be to split this into two flags. What are we showing, and what
are we animating? Showing looks to be "all" or "non-secure". Animating looks
to be "all", "none", or "only non-secure", with the last meaning the same as
"all" if "showing" is set to "non-secure".
This second suggestion also dovetails nicely with my API proposal elsewhere.
Kevin Bailey
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/views/location_bar/location_bar_view.h File chrome/browser/ui/views/location_bar/location_bar_view.h (right): https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/views/location_bar/location_bar_view.h#newcode331 chrome/browser/ui/views/location_bar/location_bar_view.h:331: bool ShouldShowSecurityChip(bool* should_animate) const; On 2016/10/10 21:39:21, Peter Kasting ...
4 years, 2 months ago
(2016-10-11 00:44:05 UTC)
#21
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/view...
File chrome/browser/ui/views/location_bar/location_bar_view.h (right):
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/view...
chrome/browser/ui/views/location_bar/location_bar_view.h:331: bool
ShouldShowSecurityChip(bool* should_animate) const;
On 2016/10/10 21:39:21, Peter Kasting (very slow) wrote:
> I think it might make more sense to have separate ShouldShowSecurityChip() and
> ShouldAnimateSecurityChip() functions.
>
> Semantically, I'm not really a big fan of functions that are named
ComputeXXX()
> and then take an outparam that is set to the result of some computation YYY
that
> is different from XXX. I realize that it doesn't make sense to animate
> something that isn't showing, but that just means the second function can be
> implemented in terms of the first. (We need not be more clever about reducing
> duplicated work, since ShouldShow is simple to compute and won't be a perf
> bottleneck.)
>
> This would allow callers to avoid passing nullptr to signal that they don't
> care, and let the caller that does care just do:
>
> location_icon_view_->SetSecurityState(
> ShouldShowSecurityChip(), !contents && ShouldAnimateSecurityChip());
>
> ...no temps needed.
If GetSecurityLevel() were more stable, I would completely agree. Unfortunately,
it seems to change at the drop of a hat. Aren't you concerned with it returning
different values to each caller? Granted, it's only displaying a chip, but it
seems a little harsh to suffer incorrect behavior for a style preference.
A simpler way to eliminate the 'nullptr' is with a default argument.
Peter Kasting
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/views/location_bar/location_bar_view.h File chrome/browser/ui/views/location_bar/location_bar_view.h (right): https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/views/location_bar/location_bar_view.h#newcode331 chrome/browser/ui/views/location_bar/location_bar_view.h:331: bool ShouldShowSecurityChip(bool* should_animate) const; On 2016/10/11 00:44:05, Kevin Bailey ...
4 years, 2 months ago
(2016-10-11 00:54:18 UTC)
#22
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/view...
File chrome/browser/ui/views/location_bar/location_bar_view.h (right):
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/view...
chrome/browser/ui/views/location_bar/location_bar_view.h:331: bool
ShouldShowSecurityChip(bool* should_animate) const;
On 2016/10/11 00:44:05, Kevin Bailey wrote:
> On 2016/10/10 21:39:21, Peter Kasting (very slow) wrote:
> > I think it might make more sense to have separate ShouldShowSecurityChip()
and
> > ShouldAnimateSecurityChip() functions.
> >
> > Semantically, I'm not really a big fan of functions that are named
> ComputeXXX()
> > and then take an outparam that is set to the result of some computation YYY
> that
> > is different from XXX. I realize that it doesn't make sense to animate
> > something that isn't showing, but that just means the second function can be
> > implemented in terms of the first. (We need not be more clever about
reducing
> > duplicated work, since ShouldShow is simple to compute and won't be a perf
> > bottleneck.)
> >
> > This would allow callers to avoid passing nullptr to signal that they don't
> > care, and let the caller that does care just do:
> >
> > location_icon_view_->SetSecurityState(
> > ShouldShowSecurityChip(), !contents && ShouldAnimateSecurityChip());
> >
> > ...no temps needed.
>
> If GetSecurityLevel() were more stable, I would completely agree.
Unfortunately,
> it seems to change at the drop of a hat. Aren't you concerned with it
returning
> different values to each caller?
No.
If we thought this was problematic, such that we wanted to bake it into the API,
I would suggest changing the name to something that makes it clear we're
fetching both pieces of state (and maybe return a tuple). I don't think it's
problematic, though. This is a private method being used in few places, and all
this code, being UI code, is run on the same thread. The answer to whether the
security state should be shown will change at definable points, i.e. not
suddenly between two adjacent lines in the caller.
> Granted, it's only displaying a chip, but it
> seems a little harsh to suffer incorrect behavior for a style preference.
>
> A simpler way to eliminate the 'nullptr' is with a default argument.
That would indeed help with verbosity at the other callsites, but not with the
munging of separate (dependent) concepts into one function.
spqchan
Description was changed from ========== [Material] Update Material Security Verbose Decoration Flag - Removed "Material" ...
4 years, 2 months ago
(2016-10-11 17:26:02 UTC)
#23
Description was changed from
==========
[Material] Update Material Security Verbose Decoration Flag
- Removed "Material" from the flag's name
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682, 653602
==========
to
==========
[Material] Update Material Security Verbose Decoration Flag
- Removed "Material" from the flag's name
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682
==========
spqchan
PTAL https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/views/location_bar/location_bar_view.h File chrome/browser/ui/views/location_bar/location_bar_view.h (right): https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/views/location_bar/location_bar_view.h#newcode329 chrome/browser/ui/views/location_bar/location_bar_view.h:329: // should_animate is not null, then set the ...
4 years, 2 months ago
(2016-10-11 17:32:58 UTC)
#24
PTAL
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/view...
File chrome/browser/ui/views/location_bar/location_bar_view.h (right):
https://codereview.chromium.org/2378623007/diff/120001/chrome/browser/ui/view...
chrome/browser/ui/views/location_bar/location_bar_view.h:329: // should_animate
is not null, then set the value to true if the chip should
On 2016/10/10 21:39:21, Peter Kasting (very slow) wrote:
> Nit: "...|should_animate| is non-null, sets it to whether the chip should be
> animated."
>
> (Adds ||, changes imperative to declarative verb, shortens)
Updated the comment
https://codereview.chromium.org/2378623007/diff/120001/chrome/common/chrome_s...
File chrome/common/chrome_switches.h (right):
https://codereview.chromium.org/2378623007/diff/120001/chrome/common/chrome_s...
chrome/common/chrome_switches.h:191: extern const char
kSecurityVerboseDecorationShowAllWithOnlyNonSecureAnimated[];
On 2016/10/10 21:39:21, Peter Kasting (very slow) wrote:
> Nit: This name is kinda reaching ridiculous length. It's resulting in crazy
> wrapping at usage sites. Let's look for shorter names.
>
> One improvement would be to say SecurityChip in place of
> SecurityVerboseDecoration. Neither is terribly meaningful on its own, but the
> former is the language we use in various comments and email threads.
>
> Another might be to split this into two flags. What are we showing, and what
> are we animating? Showing looks to be "all" or "non-secure". Animating looks
> to be "all", "none", or "only non-secure", with the last meaning the same as
> "all" if "showing" is set to "non-secure".
>
> This second suggestion also dovetails nicely with my API proposal elsewhere.
Agreed, it's getting ridiculous. I split the flag and renamed it.
Peter Kasting
LGTM https://codereview.chromium.org/2378623007/diff/160001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/2378623007/diff/160001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode1018 chrome/browser/ui/views/location_bar/location_bar_view.cc:1018: Nit: Any particular reason you added this blank ...
4 years, 2 months ago
(2016-10-11 22:14:50 UTC)
#25
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/85415) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 2 months ago
(2016-10-12 20:57:58 UTC)
#34
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/144819) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 2 months ago
(2016-10-12 23:18:18 UTC)
#39
Description was changed from ========== [Material] Update Material Security Verbose Decoration Flag - Removed "Material" ...
4 years, 2 months ago
(2016-10-13 00:16:45 UTC)
#43
Message was sent while issue was closed.
Description was changed from
==========
[Material] Update Material Security Verbose Decoration Flag
- Removed "Material" from the flag's name
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682
==========
to
==========
[Material] Update Material Security Verbose Decoration Flag
- Removed "Material" from the flag's name
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682
==========
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 2 months ago
(2016-10-13 00:16:47 UTC)
#44
Message was sent while issue was closed.
Committed patchset #13 (id:240001)
commit-bot: I haz the power
Description was changed from ========== [Material] Update Material Security Verbose Decoration Flag - Removed "Material" ...
4 years, 2 months ago
(2016-10-13 00:21:16 UTC)
#45
Message was sent while issue was closed.
Description was changed from
==========
[Material] Update Material Security Verbose Decoration Flag
- Removed "Material" from the flag's name
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682
==========
to
==========
[Material] Update Material Security Verbose Decoration Flag
- Removed "Material" from the flag's name
- Added the option "Show all, only animate nonsecure"
- Set the default flag value to "Show all, non-animated"
BUG=651991, 649682
Committed: https://crrev.com/d52dccd7192814d740a8bae50fcd32eb00816ce4
Cr-Commit-Position: refs/heads/master@{#424917}
==========
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/d52dccd7192814d740a8bae50fcd32eb00816ce4 Cr-Commit-Position: refs/heads/master@{#424917}
4 years, 2 months ago
(2016-10-13 00:21:18 UTC)
#46
Issue 2378623007: [Material] Update Material Security Verbose Decoration Flag
(Closed)
Created 4 years, 2 months ago by spqchan
Modified 4 years, 2 months ago
Reviewers: Robert Sesek, Kevin Bailey, Peter Kasting, Ilya Sherman
Base URL:
Comments: 13