Description was changed from
==========
Display content settings for extensions with extension name.
Instead of showing a cryptic id for content settings for extensions,
display the extension name instead. If an extension has a favicon it is
shown as well.
BUG=412740
==========
to
==========
Display content settings for extensions with extension name.
Instead of showing a cryptic id for content settings for extensions,
display the extension name instead. If an extension has a favicon it is
shown as well.
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
dullweber
The CQ bit was checked by dullweber@chromium.org to run a CQ dry run
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/320879)
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/186521)
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/320953)
Description was changed from
==========
Display content settings for extensions with extension name.
Instead of showing a cryptic id for content settings for extensions,
display the extension name instead. If an extension has a favicon it is
shown as well.
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
to
==========
Display content settings for extensions with extension name.
Instead of showing a cryptic id for content settings for extensions,
display the extension name instead. If an extension has a favicon it is
shown as well.
https://screenshot.googleplex.com/7rMF5f26CmW
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
dullweber
Description was changed from ========== Display content settings for extensions with extension name. Instead of ...
Description was changed from
==========
Display content settings for extensions with extension name.
Instead of showing a cryptic id for content settings for extensions,
display the extension name instead. If an extension has a favicon it is
shown as well.
https://screenshot.googleplex.com/7rMF5f26CmW
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
to
==========
Display content settings for extensions with extension name.
Instead of showing a cryptic id for content settings for extensions,
display the extension name instead. If an extension has a favicon it is
shown as well.
I only applied this fix to the new MD settings. Should it be fixed for the old
settings as well?
https://screenshot.googleplex.com/7rMF5f26CmW
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
dullweber
Description was changed from ========== Display content settings for extensions with extension name. Instead of ...
Description was changed from
==========
Display content settings for extensions with extension name.
Instead of showing a cryptic id for content settings for extensions,
display the extension name instead. If an extension has a favicon it is
shown as well.
I only applied this fix to the new MD settings. Should it be fixed for the old
settings as well?
https://screenshot.googleplex.com/7rMF5f26CmW
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
to
==========
Display content settings for extensions with extension name.
Instead of showing a cryptic id for content settings for extensions,
display the extension name instead. If an extension has a favicon it is
shown as well.
I only applied this fix to the new MD settings. Should it be fixed for the old
settings as well?
https://screenshot.googleplex.com/7rMF5f26CmWhttps://screenshot.googleplex.com/9TbvP1zDYWJ
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
dullweber
Description was changed from ========== Display content settings for extensions with extension name. Instead of ...
Description was changed from
==========
Display content settings for extensions with extension name.
Instead of showing a cryptic id for content settings for extensions,
display the extension name instead. If an extension has a favicon it is
shown as well.
I only applied this fix to the new MD settings. Should it be fixed for the old
settings as well?
https://screenshot.googleplex.com/7rMF5f26CmWhttps://screenshot.googleplex.com/9TbvP1zDYWJ
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
to
==========
Display content settings and zoomlevel for extensions with extension name
instead of showing a cryptic id.
If an extension has a favicon it is shown as well.
I only applied this fix to the new MD settings. Should it be fixed for the old
settings as well?
https://screenshot.googleplex.com/7rMF5f26CmWhttps://screenshot.googleplex.com/9TbvP1zDYWJ
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
Description was changed from
==========
Display content settings and zoomlevel for extensions with extension name
instead of showing a cryptic id.
If an extension has a favicon it is shown as well.
I only applied this fix to the new MD settings. Should it be fixed for the old
settings as well?
https://screenshot.googleplex.com/7rMF5f26CmWhttps://screenshot.googleplex.com/9TbvP1zDYWJ
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
to
==========
Display content settings and zoomlevel for extensions with extension name
instead of showing a cryptic id.
If an extension has a favicon, it is shown as well.
https://screenshot.googleplex.com/7rMF5f26CmWhttps://screenshot.googleplex.com/9TbvP1zDYWJ
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
dullweber
On 2016/11/24 10:12:17, dullweber wrote: > Martin, please review these changes I only applied this ...
On 2016/11/24 10:12:17, dullweber wrote:
> Martin, please review these changes
I only applied this fix to the new MD settings. Should it be fixed for the old
settings as well?
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
LGTM, thanks! I didn't review the rest thoroughly, leaving that to the respective owners. https://codereview.chromium.org/2525943002/diff/70001/chrome/browser/ui/webui/site_settings_helper.cc ...
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resources/settings/site_settings/site_list.html File chrome/browser/resources/settings/site_settings/site_list.html (right): https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resources/settings/site_settings/site_list.html#newcode69 chrome/browser/resources/settings/site_settings/site_list.html:69: style$="[[computeSiteIcon(item.origin)]]"> I'm not clear on why this change was ...
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
File chrome/browser/resources/settings/site_settings/site_list.html (right):
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
chrome/browser/resources/settings/site_settings/site_list.html:69:
style$="[[computeSiteIcon(item.origin)]]">
I'm not clear on why this change was made origin rather
than leaving it as originForDisplay or maybe originForFavicon.
Could ya tell me more about this change?
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
File chrome/browser/resources/settings/site_settings/zoom_levels.html (right):
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
chrome/browser/resources/settings/site_settings/zoom_levels.html:29:
<div>[[item.displayName]]</div>
WDYT: Would it help to filter zoom level sites
through expandSiteException() and use originForDisplay
here? If a zoom level will never have an embedded origin
and will always have a displayName then maybe it won't help.
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/ui/webui...
File chrome/browser/ui/webui/settings/site_settings_handler.cc (right):
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/ui/webui...
chrome/browser/ui/webui/settings/site_settings_handler.cc:653: if (host.length()
== 32) {
The code is ok, maybe change the comments around a bit.
The current comment gave me the impression that we are
using the host length to determine whether this is an
extension, which sounds like a potential security issue.
After reading it more closely, it looks like we could
treat every entry as a possible extension; and checking
the host length is only an optimization (to reduce time
spend on checking hosts that will never be an extension)
and therefor not a security concern.
If I'm correct on that, please alter the comments to so
that it's more obvious to the next reader.
Maybe
// As an optimization, only check hosts that could be an extension.
if (host.lenth() == 32) {
// Look up the host as an extension, if found then it is an extension.
[...]
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/ui/webui...
File chrome/browser/ui/webui/site_settings_helper_unittest.cc (right):
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/ui/webui...
chrome/browser/ui/webui/site_settings_helper_unittest.cc:60: false /* incognito
*/, nullptr /* filter */, &exceptions);
Optional:
I know that argument comments appear as
pre and post -fix in the code; and that the post-fix
was already used in this file, but it makes sense
to me to migrate one way or the other, so I'd like
to suggest going with the style guide suggestion of
prefix comments like:
..., /*extension_registry=*/nullptr , ...
prefixing and taking the spaces out makes it much
easier for me to pick out the parameters in the
list.
Described here:
https://google.github.io/styleguide/cppguide.html#Function_Comments
dullweber
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resources/settings/site_settings/site_list.html File chrome/browser/resources/settings/site_settings/site_list.html (right): https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resources/settings/site_settings/site_list.html#newcode69 chrome/browser/resources/settings/site_settings/site_list.html:69: style$="[[computeSiteIcon(item.origin)]]"> On 2016/11/28 21:58:42, dschuyler wrote: > I'm not ...
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
File chrome/browser/resources/settings/site_settings/site_list.html (right):
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
chrome/browser/resources/settings/site_settings/site_list.html:69:
style$="[[computeSiteIcon(item.origin)]]">
On 2016/11/28 21:58:42, dschuyler wrote:
> I'm not clear on why this change was made origin rather
> than leaving it as originForDisplay or maybe originForFavicon.
> Could ya tell me more about this change?
In case of extensions, the originForDisplay is now a text, e.g. "Bookmark
Manager". The favicon function needs a "chrome-extension://asdfghjkl..." url.
Maybe I should rename "originForDisplay" to something like "name" to indicate
that it might not have anything to do with an origin?
I don't need originForFavicon for the site-list because origin already contains
the scheme. Only Zoomlevels need a separate handling for this.
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
File chrome/browser/resources/settings/site_settings/zoom_levels.html (right):
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
chrome/browser/resources/settings/site_settings/zoom_levels.html:29:
<div>[[item.displayName]]</div>
On 2016/11/28 21:58:42, dschuyler wrote:
> WDYT: Would it help to filter zoom level sites
> through expandSiteException() and use originForDisplay
> here? If a zoom level will never have an embedded origin
> and will always have a displayName then maybe it won't help.
I don't think the expansion code is useful because exceptions and zoomlevels
work differently.
Content-settings use scheme+host as origin and maybe an additional
embeddedOrigin to refer to a rule. Zoomlevels usually use just the host as an
identifier to have a consistent behavior between http and https urls. This is
the reason, why I have to use the weird extension detection code, to find out if
something is probably an extension and get the right extension url to find the
favicon.
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/ui/webui...
File chrome/browser/ui/webui/settings/site_settings_handler.cc (right):
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/ui/webui...
chrome/browser/ui/webui/settings/site_settings_handler.cc:653: if (host.length()
== 32) {
On 2016/11/28 21:58:42, dschuyler wrote:
> The code is ok, maybe change the comments around a bit.
>
> The current comment gave me the impression that we are
> using the host length to determine whether this is an
> extension, which sounds like a potential security issue.
> After reading it more closely, it looks like we could
> treat every entry as a possible extension; and checking
> the host length is only an optimization (to reduce time
> spend on checking hosts that will never be an extension)
> and therefor not a security concern.
>
> If I'm correct on that, please alter the comments to so
> that it's more obvious to the next reader.
>
> Maybe
>
> // As an optimization, only check hosts that could be an extension.
> if (host.lenth() == 32) {
> // Look up the host as an extension, if found then it is an extension.
> [...]
>
That's right. I wanted to avoid checking every entry. I used your comment
suggestion.
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/ui/webui...
File chrome/browser/ui/webui/site_settings_helper_unittest.cc (right):
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/ui/webui...
chrome/browser/ui/webui/site_settings_helper_unittest.cc:60: false /* incognito
*/, nullptr /* filter */, &exceptions);
On 2016/11/28 21:58:42, dschuyler wrote:
> Optional:
>
> I know that argument comments appear as
> pre and post -fix in the code; and that the post-fix
> was already used in this file, but it makes sense
> to me to migrate one way or the other, so I'd like
> to suggest going with the style guide suggestion of
> prefix comments like:
> ..., /*extension_registry=*/nullptr , ...
> prefixing and taking the spaces out makes it much
> easier for me to pick out the parameters in the
> list.
>
> Described here:
> https://google.github.io/styleguide/cppguide.html#Function_Comments
Done.
dschuyler
LGTM (with a suggestion that I think would be an improvement). https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resources/settings/site_settings/site_list.html File chrome/browser/resources/settings/site_settings/site_list.html (right): ...
LGTM (with a suggestion that I think would be an improvement).
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
File chrome/browser/resources/settings/site_settings/site_list.html (right):
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
chrome/browser/resources/settings/site_settings/site_list.html:69:
style$="[[computeSiteIcon(item.origin)]]">
On 2016/11/29 09:34:18, dullweber wrote:
> On 2016/11/28 21:58:42, dschuyler wrote:
> > I'm not clear on why this change was made origin rather
> > than leaving it as originForDisplay or maybe originForFavicon.
> > Could ya tell me more about this change?
>
> In case of extensions, the originForDisplay is now a text, e.g. "Bookmark
> Manager". The favicon function needs a "chrome-extension://asdfghjkl..." url.
> Maybe I should rename "originForDisplay" to something like "name" to indicate
> that it might not have anything to do with an origin?
> I don't need originForFavicon for the site-list because origin already
contains
> the scheme. Only Zoomlevels need a separate handling for this.
I like the variable label of |displayName| used elsewhere in this CL.
That could be an optional or separate CL. I.e. I don't want to hold up
this CL for that change, but I think it would be nicer than |origin|
which may not be an origin.
Maybe the C++ side could set |origin| and
|displayName| separately rather than
interpreting it on the JS side.
Said another way, I'm suggesting this series of steps:
- that this change back to originForDisplay
- originForDisplay be renamed as displayName
- displayName set on the C++ side to be either an origin intended for display or
an extension name (or something else in the future). [With this CL setting
displayName - does displayName get set in all cases?]
- origin with then only be an origin (or maybe empty if there is not relevant
origin).
WDYT? I'm open to chatting about this outside of this CL if you prefer.
dullweber
On 2016/11/29 22:46:59, dschuyler wrote: > LGTM (with a suggestion that I think would be ...
On 2016/11/29 22:46:59, dschuyler wrote:
> LGTM (with a suggestion that I think would be an improvement).
>
>
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
> File chrome/browser/resources/settings/site_settings/site_list.html (right):
>
>
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
> chrome/browser/resources/settings/site_settings/site_list.html:69:
> style$="[[computeSiteIcon(item.origin)]]">
> On 2016/11/29 09:34:18, dullweber wrote:
> > On 2016/11/28 21:58:42, dschuyler wrote:
> > > I'm not clear on why this change was made origin rather
> > > than leaving it as originForDisplay or maybe originForFavicon.
> > > Could ya tell me more about this change?
> >
> > In case of extensions, the originForDisplay is now a text, e.g. "Bookmark
> > Manager". The favicon function needs a "chrome-extension://asdfghjkl..."
url.
> > Maybe I should rename "originForDisplay" to something like "name" to
indicate
> > that it might not have anything to do with an origin?
> > I don't need originForFavicon for the site-list because origin already
> contains
> > the scheme. Only Zoomlevels need a separate handling for this.
>
> I like the variable label of |displayName| used elsewhere in this CL.
> That could be an optional or separate CL. I.e. I don't want to hold up
> this CL for that change, but I think it would be nicer than |origin|
> which may not be an origin.
>
> Maybe the C++ side could set |origin| and
> |displayName| separately rather than
> interpreting it on the JS side.
>
> Said another way, I'm suggesting this series of steps:
> - that this change back to originForDisplay
> - originForDisplay be renamed as displayName
> - displayName set on the C++ side to be either an origin intended for display
or
> an extension name (or something else in the future). [With this CL setting
> displayName - does displayName get set in all cases?]
> - origin with then only be an origin (or maybe empty if there is not relevant
> origin).
>
> WDYT? I'm open to chatting about this outside of this CL if you prefer.
That sounds like a good idea. There is also |embeddingOriginForDisplay|. I will
rename it to |embeddingDisplayName|.
I already implemented this change now to improve the consistency. I checked the
browserProxy calls and |displayName| should be set in all cases in
GetExceptionForPage() (site_settings_helper.cc).
site_details.html is also affected but I'm not sure if it is used anywhere so I
couldn't test it.
On 2016/11/30 09:29:51, dullweber wrote:
> On 2016/11/29 22:46:59, dschuyler wrote:
> > LGTM (with a suggestion that I think would be an improvement).
> >
> >
>
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
> > File chrome/browser/resources/settings/site_settings/site_list.html (right):
> >
> >
>
https://codereview.chromium.org/2525943002/diff/90001/chrome/browser/resource...
> > chrome/browser/resources/settings/site_settings/site_list.html:69:
> > style$="[[computeSiteIcon(item.origin)]]">
> > On 2016/11/29 09:34:18, dullweber wrote:
> > > On 2016/11/28 21:58:42, dschuyler wrote:
> > > > I'm not clear on why this change was made origin rather
> > > > than leaving it as originForDisplay or maybe originForFavicon.
> > > > Could ya tell me more about this change?
> > >
> > > In case of extensions, the originForDisplay is now a text, e.g. "Bookmark
> > > Manager". The favicon function needs a "chrome-extension://asdfghjkl..."
> url.
> > > Maybe I should rename "originForDisplay" to something like "name" to
> indicate
> > > that it might not have anything to do with an origin?
> > > I don't need originForFavicon for the site-list because origin already
> > contains
> > > the scheme. Only Zoomlevels need a separate handling for this.
> >
> > I like the variable label of |displayName| used elsewhere in this CL.
> > That could be an optional or separate CL. I.e. I don't want to hold up
> > this CL for that change, but I think it would be nicer than |origin|
> > which may not be an origin.
> >
> > Maybe the C++ side could set |origin| and
> > |displayName| separately rather than
> > interpreting it on the JS side.
> >
> > Said another way, I'm suggesting this series of steps:
> > - that this change back to originForDisplay
> > - originForDisplay be renamed as displayName
> > - displayName set on the C++ side to be either an origin intended for
display
> or
> > an extension name (or something else in the future). [With this CL setting
> > displayName - does displayName get set in all cases?]
> > - origin with then only be an origin (or maybe empty if there is not
relevant
> > origin).
> >
> > WDYT? I'm open to chatting about this outside of this CL if you prefer.
>
> That sounds like a good idea. There is also |embeddingOriginForDisplay|. I
will
> rename it to |embeddingDisplayName|.
> I already implemented this change now to improve the consistency. I checked
the
> browserProxy calls and |displayName| should be set in all cases in
> GetExceptionForPage() (site_settings_helper.cc).
> site_details.html is also affected but I'm not sure if it is used anywhere so
I
> couldn't test it.
I believe site_details.html is only accessible when the chrome://flags "site
settings"
flag is enabled. That page is a work-in-progress. It likely won't get seen much
until
January or later, so it's not critical. (If you get a chance to check it, that
would be a kindness).
dullweber
On 2016/11/30 19:23:33, dschuyler wrote: > I believe site_details.html is only accessible when the chrome://flags ...
On 2016/11/30 19:23:33, dschuyler wrote:
> I believe site_details.html is only accessible when the chrome://flags "site
> settings"
> flag is enabled. That page is a work-in-progress. It likely won't get seen
much
> until
> January or later, so it's not critical. (If you get a chance to check it, that
> would be a kindness).
"All sites" and "Site details" look good and changing permissions for extensions
works fine!
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/348729)
Description was changed from
==========
Display content settings and zoomlevel for extensions with extension name
instead of showing a cryptic id.
If an extension has a favicon, it is shown as well.
https://screenshot.googleplex.com/7rMF5f26CmWhttps://screenshot.googleplex.com/9TbvP1zDYWJ
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
to
==========
Display content settings and zoomlevel for extensions with extension name
instead of showing a cryptic id.
If an extension has a favicon, it is shown as well.
https://screenshot.googleplex.com/7rMF5f26CmWhttps://screenshot.googleplex.com/9TbvP1zDYWJ
BUG=412740
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
Issue 2525943002: Display content settings for extensions with extension name.
(Closed)
Created 4 years ago by dullweber
Modified 4 years ago
Reviewers: msramek, dschuyler, Dan Beam
Base URL:
Comments: 23