feat: migrate protocol module to NetworkService (Part 5) (#18170)
* fix: always have head.headers available * fix: use StringDataPipeProducer to write string It can handle large strings correctly. * fix: override RegisterNonNetworkSubresourceURLLoaderFactories * fix: add dummy uninterceptProtocol implementation * fix: jquery error handler can pass empty string For some errors jquery would pass empty string in the error handler, which makes tests pass when they should fail. * chore: fix cpplint warnings * fix: guard RegisterNonNetworkSubresourceURLLoaderFactories call It may be called even when NetworkService is not enabled. * test: disable protocol.interceptHttpProtocol test
This commit is contained in:
parent
a96b6e2c96
commit
237f74a01f
7 changed files with 107 additions and 48 deletions
|
@ -78,6 +78,11 @@ bool ProtocolNS::IsProtocolRegistered(const std::string& scheme) {
|
|||
return base::ContainsKey(handlers_, scheme);
|
||||
}
|
||||
|
||||
void ProtocolNS::UninterceptProtocol(const std::string& scheme,
|
||||
mate::Arguments* args) {
|
||||
HandleOptionalCallback(args, ProtocolError::NOT_INTERCEPTED);
|
||||
}
|
||||
|
||||
v8::Local<v8::Promise> ProtocolNS::IsProtocolHandled(
|
||||
const std::string& scheme) {
|
||||
util::Promise promise(isolate());
|
||||
|
@ -129,7 +134,7 @@ void ProtocolNS::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("interceptFileProtocol", &Noop)
|
||||
.SetMethod("interceptHttpProtocol", &Noop)
|
||||
.SetMethod("interceptStreamProtocol", &Noop)
|
||||
.SetMethod("uninterceptProtocol", &Noop);
|
||||
.SetMethod("uninterceptProtocol", &ProtocolNS::UninterceptProtocol);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue