mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Read the content blocking rules and make them available to the HTTP loader.
This commit is contained in:
parent
19b1cb4f07
commit
50fea8554e
7 changed files with 66 additions and 2 deletions
|
@ -2,9 +2,9 @@
|
|||
* 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 brotli::Decompressor;
|
||||
use connector::Connector;
|
||||
use content_blocker_parser::RuleList;
|
||||
use cookie;
|
||||
use cookie_storage::CookieStorage;
|
||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, HttpRequest as DevtoolsHttpRequest};
|
||||
|
@ -104,6 +104,7 @@ pub struct HttpState {
|
|||
pub hsts_list: Arc<RwLock<HstsList>>,
|
||||
pub cookie_jar: Arc<RwLock<CookieStorage>>,
|
||||
pub auth_cache: Arc<RwLock<AuthCache>>,
|
||||
pub blocked_content: Arc<Option<RuleList>>,
|
||||
}
|
||||
|
||||
impl HttpState {
|
||||
|
@ -112,6 +113,7 @@ impl HttpState {
|
|||
hsts_list: Arc::new(RwLock::new(HstsList::new())),
|
||||
cookie_jar: Arc::new(RwLock::new(CookieStorage::new())),
|
||||
auth_cache: Arc::new(RwLock::new(AuthCache::new())),
|
||||
blocked_content: Arc::new(None),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue