Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide settings which do not apply to Brave #493

Merged
merged 2 commits into from
Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html
index 12aa760c00b9d3d21e49f7ff71618d302fb50c6f..dab841dba7337c6101448b889d4b63d538cbb69a 100644
index 12aa760c00b9d3d21e49f7ff71618d302fb50c6f..615bf73aa5e1a31e832907359d77cd0272fb5a52 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -191,6 +191,7 @@
Expand All @@ -18,7 +18,35 @@ index 12aa760c00b9d3d21e49f7ff71618d302fb50c6f..dab841dba7337c6101448b889d4b63d5
<template is="dom-if" route-path="/content/camera" no-search>
<settings-subpage page-title="$i18n{siteSettingsCategoryCamera}">
<media-picker label="$i18n{siteSettingsCameraLabel}" type="camera">
@@ -380,6 +382,19 @@
@@ -227,11 +229,13 @@
toggle-on-label="$i18n{siteSettingsCookiesAllowedRecommended}"
sub-option-label="$i18n{deleteDataPostSession}">
</category-default-setting>
+<if expr="_google_chrome">
<settings-toggle-button
pref="{{prefs.profile.block_third_party_cookies}}"
label="$i18n{thirdPartyCookie}"
sub-label="$i18n{thirdPartyCookieSublabel}">
</settings-toggle-button>
+</if>
<div id="site-data-trigger" class="settings-box" actionable
on-click="onSiteDataTap_">
<div class="start" id="cookiesLink">
@@ -301,11 +305,13 @@
</template>
<template is="dom-if" route-path="/content/javascript" no-search>
<settings-subpage page-title="$i18n{siteSettingsCategoryJavascript}">
+<if expr="_google_chrome">
<category-default-setting
toggle-off-label="$i18n{siteSettingsBlocked}"
toggle-on-label="$i18n{siteSettingsAllowedRecommended}"
category="{{ContentSettingsTypes.JAVASCRIPT}}">
</category-default-setting>
+</if>
<category-setting-exceptions
category="{{ContentSettingsTypes.JAVASCRIPT}}"
block-header="$i18n{siteSettingsBlock}">
@@ -380,6 +386,19 @@
</category-setting-exceptions>
</settings-subpage>
</template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.html b/chrome/browser/resources/settings/site_settings_page/site_settings_page.html
index b2894017d199903bb468124871b0a4d1223f923f..84324a86432dc7f47186da91931764d7792c69d7 100644
index b2894017d199903bb468124871b0a4d1223f923f..89ba15f6145479784520630932db317abbdfedee 100644
--- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.html
+++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.html
@@ -148,6 +148,25 @@
Expand Down Expand Up @@ -28,15 +28,24 @@ index b2894017d199903bb468124871b0a4d1223f923f..84324a86432dc7f47186da91931764d7
<div id="javascript" class="settings-box two-line"
category$="[[ContentSettingsTypes.JAVASCRIPT]]"
data-route="SITE_SETTINGS_JAVASCRIPT" on-click="onTapNavigate_"
@@ -242,6 +261,7 @@
@@ -221,6 +240,7 @@
aria-describedby="popupsSecondary"></button>
</paper-icon-button-light>
</div>
+<if expr="_google_chrome">
<template is="dom-if" if="[[enableSafeBrowsingSubresourceFilter_]]">
<div id="ads" class="settings-box two-line"
category$="[[ContentSettingsTypes.ADS]]"
@@ -242,6 +262,8 @@
</paper-icon-button-light>
</div>
</template>
+</if>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we merge the /if and if google_chrome here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was intentionally separate here because then if something is added in between it won't be hidden by the patch

+<if expr="_google_chrome">
<div id="background-sync" class="settings-box two-line"
category$="[[ContentSettingsTypes.BACKGROUND_SYNC]]"
data-route="SITE_SETTINGS_BACKGROUND_SYNC" on-click="onTapNavigate_"
@@ -261,6 +281,7 @@
@@ -261,6 +283,7 @@
aria-describedby="backgroundSyncSecondary"></button>
</paper-icon-button-light>
</div>
Expand Down