Auto merge of #14063 - servo:privatize-net, r=nox

Privatize most of the net crate.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14063)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-11-06 05:19:37 -06:00 committed by GitHub
commit c62ce53efa
4 changed files with 20 additions and 13 deletions

View file

@ -47,26 +47,33 @@ extern crate uuid;
extern crate webrender_traits;
extern crate websocket;
pub mod about_loader;
pub mod blob_loader;
pub mod chrome_loader;
pub mod connector;
pub mod content_blocker;
mod about_loader;
mod blob_loader;
mod chrome_loader;
mod connector;
mod content_blocker;
pub mod cookie;
pub mod cookie_storage;
mod data_loader;
pub mod file_loader;
mod file_loader;
pub mod filemanager_thread;
pub mod hsts;
pub mod http_loader;
mod http_loader;
pub mod image_cache_thread;
pub mod mime_classifier;
pub mod resource_thread;
pub mod storage_thread;
pub mod websocket_loader;
mod storage_thread;
mod websocket_loader;
/// An implementation of the [Fetch specification](https://fetch.spec.whatwg.org/)
pub mod fetch {
pub mod cors_cache;
pub mod methods;
}
/// A module for re-exports of items used in unit tests.
pub mod test {
pub use chrome_loader::resolve_chrome_url;
pub use http_loader::{HttpRequest, HttpRequestFactory, HttpResponse, HttpState};
pub use http_loader::{LoadError, LoadErrorType, UIProvider, load};
}

View file

@ -2,7 +2,7 @@
* 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 net::chrome_loader::resolve_chrome_url;
use net::test::resolve_chrome_url;
use url::Url;
fn c(s: &str) -> Result<Url, ()> {

View file

@ -22,9 +22,9 @@ use msg::constellation_msg::{PipelineId, TEST_PIPELINE_ID};
use net::cookie::Cookie;
use net::cookie_storage::CookieStorage;
use net::hsts::HstsEntry;
use net::http_loader::{HttpRequest, HttpRequestFactory, HttpState, LoadError, UIProvider, load};
use net::http_loader::{HttpResponse, LoadErrorType};
use net::resource_thread::{AuthCacheEntry, CancellationListener};
use net::test::{HttpRequest, HttpRequestFactory, HttpState, LoadError, UIProvider, load};
use net::test::{HttpResponse, LoadErrorType};
use net_traits::{CookieSource, IncludeSubdomains, LoadContext, LoadData};
use net_traits::{CustomResponse, LoadOrigin, Metadata, ReferrerPolicy};
use std::borrow::Cow;

View file

@ -37,7 +37,7 @@ use devtools_traits::DevtoolsControlMsg;
use filemanager_thread::{TestProvider, TEST_PROVIDER};
use net::fetch::methods::{FetchContext, fetch};
use net::filemanager_thread::FileManager;
use net::http_loader::HttpState;
use net::test::HttpState;
use net_traits::FetchTaskTarget;
use net_traits::request::Request;
use net_traits::response::Response;