diff --git a/app/extensions/brave/locales/en-US/preferences.properties b/app/extensions/brave/locales/en-US/preferences.properties index 460256c424c..7368ebf6316 100644 --- a/app/extensions/brave/locales/en-US/preferences.properties +++ b/app/extensions/brave/locales/en-US/preferences.properties @@ -249,6 +249,8 @@ enablePinterest=Enable Pinterest enableMetamask=Enable MetaMask useHardwareAcceleration=Use hardware acceleration when available * useSmoothScroll=Enable smooth scrolling * +siteIsolation=Strict Site Isolation +useSiteIsolation=Enhance security by loading each site in its own process (experimental) * defaultZoomLevel=Default zoom level toolbarUserInterfaceScale=Toolbar and UI elements scale en-US=English (U.S.) @@ -360,7 +362,6 @@ scaleSizeNormal=Normal scaleSizeLarger=Larger scaleSizeSuper=Supersize urlBarOptions=URL Bar Options -disableTitleMode=Always show the URL bar wideURLbar=Use wide URL bar autoplay=Autoplay Media tabPreviewTiming=Time to wait before previewing a tab diff --git a/app/index.js b/app/index.js index bada8654569..9f81dcec67a 100644 --- a/app/index.js +++ b/app/index.js @@ -99,17 +99,22 @@ let loadAppStatePromise = SessionStore.loadAppState() // Some settings must be set right away on startup, those settings should be handled here. loadAppStatePromise.then((initialImmutableState) => { - const {HARDWARE_ACCELERATION_ENABLED, SMOOTH_SCROLL_ENABLED, SEND_CRASH_REPORTS} = require('../js/constants/settings') - CrashHerald.init(getSetting(SEND_CRASH_REPORTS, initialImmutableState.get('settings'))) + const {HARDWARE_ACCELERATION_ENABLED, SMOOTH_SCROLL_ENABLED, SEND_CRASH_REPORTS, SITE_ISOLATION_ENABLED} = require('../js/constants/settings') + const initialSettings = initialImmutableState.get('settings') + CrashHerald.init(getSetting(SEND_CRASH_REPORTS, initialSettings)) telemetry.setCheckpointAndReport('state-loaded') - if (getSetting(HARDWARE_ACCELERATION_ENABLED, initialImmutableState.get('settings')) === false) { + if (getSetting(HARDWARE_ACCELERATION_ENABLED, initialSettings) === false) { app.disableHardwareAcceleration() } - if (getSetting(SMOOTH_SCROLL_ENABLED, initialImmutableState.get('settings')) === false) { + if (getSetting(SMOOTH_SCROLL_ENABLED, initialSettings) === false) { app.commandLine.appendSwitch('disable-smooth-scrolling') } + + if (getSetting(SITE_ISOLATION_ENABLED, initialSettings) === true) { + app.commandLine.appendSwitch('site-per-process') + } }) const notifyCertError = (webContents, url, error, cert) => { diff --git a/docs/state.md b/docs/state.md index 0ec7fef7fc3..fe2178b10a3 100644 --- a/docs/state.md +++ b/docs/state.md @@ -428,6 +428,7 @@ AppStore 'search.default-search-engine': string, // name of search engine, from js/data/searchProviders.js 'search.offer-search-suggestions': boolean, // true if suggestions should be offered from the default search engine when available. 'security.flash.installed': boolean, + 'security.site-isolation-enabled': boolean, 'shields.blocked-count-badge': boolean, // true if blocked counts on the shield button should be enabled 'shields.compact-bravery-panel': boolean, // true if the compact Bravery panel should be enabled 'security.passwords.active-password-manager': string, // name of active password manager diff --git a/js/about/preferences.js b/js/about/preferences.js index 49e72491b0a..b4e67d738b9 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -701,6 +701,10 @@ class SecurityTab extends ImmutableComponent { + + + +
@@ -876,6 +880,7 @@ class AboutPreferences extends React.Component { settings.PDFJS_ENABLED, settings.TORRENT_VIEWER_ENABLED, settings.SMOOTH_SCROLL_ENABLED, + settings.SITE_ISOLATION_ENABLED, settings.SEND_CRASH_REPORTS, settings.SPELLCHECK_ENABLED, settings.SPELLCHECK_LANGUAGES diff --git a/js/constants/appConfig.js b/js/constants/appConfig.js index 09be6358682..f96a4d36f69 100644 --- a/js/constants/appConfig.js +++ b/js/constants/appConfig.js @@ -158,6 +158,7 @@ module.exports = { 'security.fullscreen.content': fullscreenOption.ALWAYS_ASK, 'security.autoplay.media': autoplayOption.ALWAYS_ALLOW, 'security.flash.installed': false, + 'security.site-isolation-enabled': false, 'shields.blocked-count-badge': true, 'shields.compact-bravery-panel': false, // sync diff --git a/js/constants/settings.js b/js/constants/settings.js index 9d5aa292a2b..51e42a61d81 100644 --- a/js/constants/settings.js +++ b/js/constants/settings.js @@ -51,6 +51,7 @@ const settings = { FLASH_INSTALLED: 'security.flash.installed', FULLSCREEN_CONTENT: 'security.fullscreen.content', AUTOPLAY_MEDIA: 'security.autoplay.media', + SITE_ISOLATION_ENABLED: 'security.site-isolation-enabled', // Autofill AUTOFILL_ENABLED: 'privacy.autofill-enabled', // Payments Tab