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
Requires brave/muon#32
Fix #2890

Auditors: @bbondy
  • Loading branch information
diracdeltas committed Aug 2, 2016
1 parent 48efe5e commit 2ceb1d3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,23 +412,23 @@ function registerForDownloadListener (session) {
})
}

function registerSession (partition, fn) {
let ses = session.fromPartition(partition)
function initSession (ses, partition) {
initializedPartitions[partition] = true
registeredSessions[partition] = ses
fn(ses, partition)
ses.setEnableBrotli(true)
}

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 2ceb1d3

Please sign in to comment.