Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some dead code related to the old network stack. #14570

Merged
merged 3 commits into from Dec 14, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Remove LoadConsumer, LoadResponse, ProgressMsg.

  • Loading branch information
Ms2ger committed Dec 13, 2016
commit 6bea1b53e6a3d51bdc8de269260df540fb674116
@@ -245,12 +245,6 @@ impl<T: BluetoothResponseListener> Action<T> for BluetoothResponseResult {
}
}

/// A wrapper for a network load that can either be channel or event-based.
#[derive(Deserialize, Serialize)]
pub enum LoadConsumer {
Channel(IpcSender<LoadResponse>),
}

/// Handle to a resource thread
pub type CoreResourceThread = IpcSender<CoreResourceMsg>;

@@ -401,19 +395,6 @@ pub fn fetch_async<F>(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<ProgressMsg>,
}

#[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<u8>),
/// 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)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.