// Copyright (c) 2021 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #ifndef SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_FACTORY_H_ #define SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_FACTORY_H_ #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "services/network/public/cpp/self_deleting_url_loader_factory.h" namespace electron { // Provide support for accessing asar archives in file:// protocol. class AsarURLLoaderFactory : public network::SelfDeletingURLLoaderFactory { public: static mojo::PendingRemote Create(); private: AsarURLLoaderFactory( mojo::PendingReceiver factory_receiver); ~AsarURLLoaderFactory() override; // network::mojom::URLLoaderFactory: void CreateLoaderAndStart( mojo::PendingReceiver loader, int32_t request_id, uint32_t options, const network::ResourceRequest& request, mojo::PendingRemote client, const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) override; }; } // namespace electron #endif // SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_FACTORY_H_