Commit f9274eb1 authored by Patti's avatar Patti Committed by Commit Bot

Settings: Fix crash navigating to All Sites for the protected content exception.

Per-site exceptions for Protected Content / Protected Media Identifier only
exists for CrOS / Android, but r503968 changed the Javascript internally so that
it was defined on all platforms, and updated Site Details to only use it on
CrOS.

This introduced a crash when Chrome tries to get the exceptions for protected
content on non-CrOS in All Sites, so fix by updating All Sites to check for CrOS
before using it.

Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I5c209cedfb6efbaee327a97d448ea9deab737b2d
Bug: 769242
Reviewed-on: https://chromium-review.googlesource.com/688914
Commit-Queue: Patti <patricialor@chromium.org>
Reviewed-by: default avatarDave Schuyler <dschuyler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505323}
parent e8c61620
......@@ -76,7 +76,8 @@
type="chrome_html" />
<structure name="IDR_SETTINGS_ALL_SITES_JS"
file="site_settings/all_sites.js"
type="chrome_html" />
type="chrome_html"
preprocess="true" />
<structure name="IDR_SETTINGS_CATEGORY_DEFAULT_SETTING_HTML"
file="site_settings/category_default_setting.html"
type="chrome_html" />
......
......@@ -46,6 +46,10 @@ Polymer({
var types = Object.values(settings.ContentSettingsTypes);
for (var i = 0; i < types.length; i++) {
var type = types[i];
// <if expr="not chromeos">
if (type == settings.ContentSettingsTypes.PROTECTED_CONTENT)
continue;
// </if>
if (type == settings.ContentSettingsTypes.PROTOCOL_HANDLERS ||
type == settings.ContentSettingsTypes.USB_DEVICES ||
type == settings.ContentSettingsTypes.ZOOM_LEVELS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment