Remove unused CancellationListener argument to obtain_response.

This commit is contained in:
Ms2ger 2016-11-22 00:04:08 +01:00
parent fb1279ec3a
commit ffc2e09ea7
2 changed files with 2 additions and 12 deletions

View file

@ -27,7 +27,7 @@ use net_traits::{CookieSource, Metadata, ReferrerPolicy};
use net_traits::hosts::replace_hosts;
use openssl;
use openssl::ssl::error::{OpensslError, SslError};
use resource_thread::{AuthCache, CancellationListener};
use resource_thread::AuthCache;
use servo_url::ServoUrl;
use std::error::Error;
use std::fmt;
@ -240,7 +240,6 @@ impl LoadError {
#[derive(Eq, PartialEq, Debug)]
pub enum LoadErrorType {
Cancelled,
Connection { reason: String },
ConnectionAborted { reason: String },
Decoding { reason: String },
@ -256,7 +255,6 @@ impl fmt::Display for LoadErrorType {
impl Error for LoadErrorType {
fn description(&self) -> &str {
match *self {
LoadErrorType::Cancelled => "load cancelled",
LoadErrorType::Connection { ref reason } => reason,
LoadErrorType::ConnectionAborted { ref reason } => reason,
LoadErrorType::Decoding { ref reason } => reason,
@ -511,7 +509,6 @@ pub fn obtain_response<A>(request_factory: &HttpRequestFactory<R=A>,
url: &ServoUrl,
method: &Method,
request_headers: &Headers,
cancel_listener: &CancellationListener,
data: &Option<Vec<u8>>,
load_data_method: &Method,
pipeline_id: &Option<PipelineId>,
@ -569,10 +566,6 @@ pub fn obtain_response<A>(request_factory: &HttpRequestFactory<R=A>,
let connect_end = precise_time_ms();
if cancel_listener.is_cancelled() {
return Err(LoadError::new(connection_url.clone(), LoadErrorType::Cancelled));
}
let send_start = precise_time_ms();
let maybe_response = req.send(request_body);