mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Remove CoreResourceMsg::Load.
Also remove now-dead code that rustc warns about. It turns out that we lost support for some of our custom URL schemes; I intend to reimplement them, but I believe this will be significantly easier to do once the legacy code is out of the way.
This commit is contained in:
parent
ce24edc2b3
commit
fb1279ec3a
12 changed files with 16 additions and 1052 deletions
|
@ -2,13 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use file_loader;
|
||||
use mime_classifier::MimeClassifier;
|
||||
use net_traits::{LoadConsumer, LoadData, NetworkError};
|
||||
use resource_thread::{CancellationListener, send_error};
|
||||
use servo_url::ServoUrl;
|
||||
use std::fs::canonicalize;
|
||||
use std::sync::Arc;
|
||||
use url::percent_encoding::percent_decode;
|
||||
use util::resource_files::resources_dir_path;
|
||||
|
||||
|
@ -34,20 +29,3 @@ pub fn resolve_chrome_url(url: &ServoUrl) -> Result<ServoUrl, ()> {
|
|||
_ => Err(())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn factory(mut load_data: LoadData,
|
||||
start_chan: LoadConsumer,
|
||||
classifier: Arc<MimeClassifier>,
|
||||
cancel_listener: CancellationListener) {
|
||||
let file_url = match resolve_chrome_url(&load_data.url) {
|
||||
Ok(url) => url,
|
||||
Err(_) => {
|
||||
send_error(load_data.url,
|
||||
NetworkError::Internal("Invalid chrome URL.".to_owned()),
|
||||
start_chan);
|
||||
return;
|
||||
}
|
||||
};
|
||||
load_data.url = file_url;
|
||||
file_loader::factory(load_data, start_chan, classifier, cancel_listener)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue