Revert "protocol: respect requests from partition"
This reverts commit 85800256de
.
This commit is contained in:
parent
bb1e4c2208
commit
8ff30a2abc
7 changed files with 49 additions and 105 deletions
|
@ -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.');
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue