Deprecate app.resolveProxy
There is now a public API to get default session, this helper is no longer necessary.
This commit is contained in:
parent
44c562ebd9
commit
08c13cf446
3 changed files with 10 additions and 12 deletions
|
@ -34,10 +34,6 @@ app.setAppPath = (path) ->
|
||||||
app.getAppPath = ->
|
app.getAppPath = ->
|
||||||
appPath
|
appPath
|
||||||
|
|
||||||
# Helpers.
|
|
||||||
app.resolveProxy = (url, callback) ->
|
|
||||||
session.defaultSession.resolveProxy url, callback
|
|
||||||
|
|
||||||
# Routes the events to webContents.
|
# Routes the events to webContents.
|
||||||
for name in ['login', 'certificate-error', 'select-client-certificate']
|
for name in ['login', 'certificate-error', 'select-client-certificate']
|
||||||
do (name) ->
|
do (name) ->
|
||||||
|
@ -51,6 +47,8 @@ app.getDataPath = deprecate 'app.getDataPath', 'app.getPath', ->
|
||||||
@getPath 'userData'
|
@getPath 'userData'
|
||||||
app.setDataPath = deprecate 'app.setDataPath', 'app.setPath', (path) ->
|
app.setDataPath = deprecate 'app.setDataPath', 'app.setPath', (path) ->
|
||||||
@setPath 'userData', path
|
@setPath 'userData', path
|
||||||
|
app.resolveProxy = deprecate 'app.resolveProxy', 'session.defaultSession.resolveProxy', (url, callback) ->
|
||||||
|
session.defaultSession.resolveProxy url, callback
|
||||||
deprecate.rename app, 'terminate', 'quit'
|
deprecate.rename app, 'terminate', 'quit'
|
||||||
deprecate.event app, 'finish-launching', 'ready', ->
|
deprecate.event app, 'finish-launching', 'ready', ->
|
||||||
setImmediate => # give default app a chance to setup default menu.
|
setImmediate => # give default app a chance to setup default menu.
|
||||||
|
|
|
@ -311,14 +311,6 @@ preferred over `name` by Electron.
|
||||||
|
|
||||||
Returns the current application locale.
|
Returns the current application locale.
|
||||||
|
|
||||||
### `app.resolveProxy(url, callback)`
|
|
||||||
|
|
||||||
* `url` URL
|
|
||||||
* `callback` Function
|
|
||||||
|
|
||||||
Resolves the proxy information for `url`. The `callback` will be called with
|
|
||||||
`callback(proxy)` when the request is performed.
|
|
||||||
|
|
||||||
### `app.addRecentDocument(path)` _OS X_ _Windows_
|
### `app.addRecentDocument(path)` _OS X_ _Windows_
|
||||||
|
|
||||||
* `path` String
|
* `path` String
|
||||||
|
|
|
@ -224,6 +224,14 @@ proxy-uri = [<proxy-scheme>"://"]<proxy-host>[":"<proxy-port>]
|
||||||
URLs.
|
URLs.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `ses.resolveProxy(url, callback)`
|
||||||
|
|
||||||
|
* `url` URL
|
||||||
|
* `callback` Function
|
||||||
|
|
||||||
|
Resolves the proxy information for `url`. The `callback` will be called with
|
||||||
|
`callback(proxy)` when the request is performed.
|
||||||
|
|
||||||
#### `ses.setDownloadPath(path)`
|
#### `ses.setDownloadPath(path)`
|
||||||
|
|
||||||
* `path` String - The download location
|
* `path` String - The download location
|
||||||
|
|
Loading…
Reference in a new issue