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

Commit

Permalink
Set cookies only for default session
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Sep 21, 2016
1 parent af145d5 commit 1dee63d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
11 changes: 0 additions & 11 deletions app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,14 +693,3 @@ module.exports.clearAutofillData = () => {
ses.autofill.clearAutofillData()
}
}

module.exports.setCookie = (cookie) => {
for (let partition in registeredSessions) {
let ses = registeredSessions[partition]
ses.cookies.set(cookie, (error) => {
if (error) {
console.error(error)
}
})
}
}
8 changes: 6 additions & 2 deletions app/importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const electron = require('electron')
const importer = electron.importer
const dialog = electron.dialog
const BrowserWindow = electron.BrowserWindow
const session = electron.session
const Immutable = require('immutable')
const showImportWarning = require('./aboutDialog').showImportWarning
const siteUtil = require('../js/state/siteUtil')
const AppStore = require('../js/stores/appStore')
const siteTags = require('../js/constants/siteTags')
const appActions = require('../js/actions/appActions')
const messages = require('../js/constants/messages')
const Filtering = require('./filtering')

var isMergeFavorites = false

Expand Down Expand Up @@ -168,7 +168,11 @@ importer.on('add-cookies', (e, cookies) => {
httpOnly: cookies[i].httponly,
expirationDate: cookies[i].expiry_date
}
Filtering.setCookie(cookie)
session.defaultSession.cookies.set(cookie, (error) => {
if (error) {
console.error(error)
}
})
}
})

Expand Down

0 comments on commit 1dee63d

Please sign in to comment.