Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Advertise Brotli compression over HTTPS by default
Browse files Browse the repository at this point in the history
Fix #2890

Auditors: @bbondy
  • Loading branch information
diracdeltas committed Aug 8, 2016
1 parent 0fe7b0b commit c847762
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,24 +413,24 @@ function registerForDownloadListener (session) {
})
}

function registerSession (partition, fn) {
let ses = session.fromPartition(partition)
ses.userPrefs.setDefaultZoomLevel(getSetting(settings.DEFAULT_ZOOM_LEVEL) || config.zoom.defaultValue)
function initSession (ses, partition) {
initializedPartitions[partition] = true
registeredSessions[partition] = ses
fn(ses, partition)
ses.setEnableBrotli(true)
ses.userPrefs.setDefaultZoomLevel(getSetting(settings.DEFAULT_ZOOM_LEVEL) || config.zoom.defaultValue)
}

function initForPartition (partition) {
let fns = [userPrefs.init,
let fns = [initSession,
userPrefs.init,
registerForBeforeRequest,
registerForBeforeRedirect,
registerForBeforeSendHeaders,
registerPermissionHandler,
registerForHeadersReceived,
registerForDownloadListener]

initializedPartitions[partition] = true
fns.forEach(registerSession.bind(this, partition))
let ses = session.fromPartition(partition)
fns.forEach((fn) => { fn(ses, partition) })
}

function shouldIgnoreUrl (url) {
Expand Down

0 comments on commit c847762

Please sign in to comment.