Revert "protocol: respect requests from partition"

This reverts commit 85800256de.
This commit is contained in:
Cheng Zhao 2016-02-24 13:25:30 +08:00
parent bb1e4c2208
commit 8ff30a2abc
7 changed files with 49 additions and 105 deletions

View file

@ -4,10 +4,7 @@ if (!app.isReady()) {
throw new Error('Can not initialize protocol module before app is ready');
}
const session = require('electron').session;
// Returns the protocol property for default session.
const protocol = session.defaultSession.protocol;
const protocol = process.atomBinding('protocol').protocol;
// Warn about removed APIs.
var logAndThrow = function(callback, message) {
@ -19,10 +16,6 @@ var logAndThrow = function(callback, message) {
}
};
protocol.fromPartition = function(partition) {
return session.fromPartition(partition).protocol;
};
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.');
};