|
@@ -1,5 +1,5 @@
|
|
|
const {EventEmitter} = require('events')
|
|
|
-const {app, deprecate} = require('electron')
|
|
|
+const {app} = require('electron')
|
|
|
const {fromPartition, Session, Cookies} = process.atomBinding('session')
|
|
|
|
|
|
// Public API.
|
|
@@ -21,15 +21,9 @@ Session.prototype._init = function () {
|
|
|
app.emit('session-created', this)
|
|
|
}
|
|
|
|
|
|
-// Remove after 2.0
|
|
|
Session.prototype.setCertificateVerifyProc = function (verifyProc) {
|
|
|
- if (!verifyProc) {
|
|
|
- this._setCertificateVerifyProc(null)
|
|
|
- return
|
|
|
- }
|
|
|
- if (verifyProc.length <= 3) {
|
|
|
- deprecate.warn('setCertificateVerifyproc(hostname, certificate, callback)',
|
|
|
- 'setCertificateVerifyproc(hostname, certificate, error, callback)')
|
|
|
+ if (verifyProc != null && verifyProc.length <= 3) {
|
|
|
+ // TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
|
|
this._setCertificateVerifyProc((hostname, certificate, error, cb) => {
|
|
|
verifyProc(hostname, certificate, (result) => {
|
|
|
cb(result ? 0 : -2)
|