Skip to content

Commit

Permalink
Hide settings which do not apply to Brave
Browse files Browse the repository at this point in the history
3rd party cookies is per site and block by default in Brave

We use our own ad block, not Google's adblock-ish, but not really
adblock.

Fix brave/brave-browser#402
Fix brave/brave-browser#1119
  • Loading branch information
bbondy committed Sep 25, 2018
1 parent 7236dd8 commit e4c003b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
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>
+<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

0 comments on commit e4c003b

Please sign in to comment.