diff --git a/atom/browser/api/lib/app.coffee b/atom/browser/api/lib/app.coffee index c2116fb7bca4..a2fdb847e1c5 100644 --- a/atom/browser/api/lib/app.coffee +++ b/atom/browser/api/lib/app.coffee @@ -34,10 +34,6 @@ app.setAppPath = (path) -> app.getAppPath = -> appPath -# Helpers. -app.resolveProxy = (url, callback) -> - session.defaultSession.resolveProxy url, callback - # Routes the events to webContents. for name in ['login', 'certificate-error', 'select-client-certificate'] do (name) -> @@ -51,6 +47,8 @@ app.getDataPath = deprecate 'app.getDataPath', 'app.getPath', -> @getPath 'userData' app.setDataPath = deprecate 'app.setDataPath', 'app.setPath', (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.event app, 'finish-launching', 'ready', -> setImmediate => # give default app a chance to setup default menu. diff --git a/docs/api/app.md b/docs/api/app.md index d7850c4cb92c..a1d87d2fe993 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -311,14 +311,6 @@ preferred over `name` by Electron. 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_ * `path` String diff --git a/docs/api/session.md b/docs/api/session.md index b921fc4839bd..a69c5939ed65 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -224,6 +224,14 @@ proxy-uri = ["://"][":"] 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)` * `path` String - The download location