From f2d8eadf4e654a42f20bdbd569d9f399a21332cf Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 2 May 2016 09:31:42 -0700 Subject: [PATCH] Remove deprecated prototol APIs --- lib/browser/api/protocol.js | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/lib/browser/api/protocol.js b/lib/browser/api/protocol.js index dac679f43e..8e89055b73 100644 --- a/lib/browser/api/protocol.js +++ b/lib/browser/api/protocol.js @@ -4,28 +4,4 @@ if (!app.isReady()) { throw new Error('Can not initialize protocol module before app is ready') } -const protocol = process.atomBinding('protocol').protocol - -// Warn about removed APIs. -var logAndThrow = function (callback, message) { - console.error(message) - if (callback) { - return callback(new Error(message)) - } else { - throw new Error(message) - } -} - -protocol.registerProtocol = function (scheme, handler, callback) { - return logAndThrow(callback, 'registerProtocol API has been replaced by the register[File/Http/Buffer/String]Protocol API family, please switch to the new APIs.') -} - -protocol.isHandledProtocol = function (scheme, callback) { - return logAndThrow(callback, 'isHandledProtocol API has been replaced by isProtocolHandled.') -} - -protocol.interceptProtocol = function (scheme, handler, callback) { - return logAndThrow(callback, 'interceptProtocol API has been replaced by the intercept[File/Http/Buffer/String]Protocol API family, please switch to the new APIs.') -} - -module.exports = protocol +module.exports = process.atomBinding('protocol').protocol