diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs index bd0fae8d777..b17a33fd421 100644 --- a/components/net_traits/lib.rs +++ b/components/net_traits/lib.rs @@ -245,12 +245,6 @@ impl Action for BluetoothResponseResult { } } -/// A wrapper for a network load that can either be channel or event-based. -#[derive(Deserialize, Serialize)] -pub enum LoadConsumer { - Channel(IpcSender), -} - /// Handle to a resource thread pub type CoreResourceThread = IpcSender; @@ -401,19 +395,6 @@ pub fn fetch_async(request: RequestInit, core_resource_thread.send(CoreResourceMsg::Fetch(request, action_sender)).unwrap(); } -/// Message sent in response to `Load`. Contains metadata, and a port -/// for receiving the data. -/// -/// Even if loading fails immediately, we send one of these and the -/// progress_port will provide the error. -#[derive(Serialize, Deserialize)] -pub struct LoadResponse { - /// Metadata, such as from HTTP headers. - pub metadata: Metadata, - /// Port for reading data. - pub progress_port: IpcReceiver, -} - #[derive(Clone, Deserialize, Serialize, HeapSizeOf)] pub struct ResourceCorsData { /// CORS Preflight flag @@ -499,15 +480,6 @@ pub enum CookieSource { NonHTTP, } -/// Messages sent in response to a `Load` message -#[derive(PartialEq, Debug, Deserialize, Serialize)] -pub enum ProgressMsg { - /// Binary data - there may be multiple of these - Payload(Vec), - /// Indicates loading is complete, either successfully or not - Done(Result<(), NetworkError>), -} - /// Convenience function for synchronously loading a whole resource. pub fn load_whole_resource(request: RequestInit, core_resource_thread: &CoreResourceThread)