diff options
author | Peter Hall <peterjoel@gmail.com> | 2019-02-14 12:53:59 +0000 |
---|---|---|
committer | Peter Hall <peterjoel@gmail.com> | 2019-03-20 15:01:26 +0000 |
commit | 8bfd4dc1e2f9c71ff3d1f9964565c43a6ae02278 (patch) | |
tree | 3e59f25c2588711f4185c6fbba16af293d1d3453 /components/net/filemanager_thread.rs | |
parent | 34fda66dfa5528f2b10a873e9a67417c6986c712 (diff) | |
download | servo-8bfd4dc1e2f9c71ff3d1f9964565c43a6ae02278.tar.gz servo-8bfd4dc1e2f9c71ff3d1f9964565c43a6ae02278.zip |
#8539 Config preferences backend restructure
Diffstat (limited to 'components/net/filemanager_thread.rs')
-rw-r--r-- | components/net/filemanager_thread.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/components/net/filemanager_thread.rs b/components/net/filemanager_thread.rs index d10b149bc7c..2052b6e0fed 100644 --- a/components/net/filemanager_thread.rs +++ b/components/net/filemanager_thread.rs @@ -18,7 +18,6 @@ use net_traits::filemanager_thread::{ use net_traits::http_percent_encode; use net_traits::response::{Response, ResponseBody}; use servo_arc::Arc as ServoArc; -use servo_config::prefs::PREFS; use std::collections::HashMap; use std::fs::File; use std::io::{BufRead, BufReader, Read, Seek, SeekFrom}; @@ -311,7 +310,7 @@ impl FileManagerStore { // Check if the select_files preference is enabled // to ensure process-level security against compromised script; // Then try applying opt_test_path directly for testing convenience - let opt_s = if select_files_pref_enabled() { + let opt_s = if pref!(dom.testing.html_input_element.select_files.enabled) { opt_test_path } else { self.query_files_from_embedder(patterns, false, embedder_proxy) @@ -342,7 +341,7 @@ impl FileManagerStore { // Check if the select_files preference is enabled // to ensure process-level security against compromised script; // Then try applying opt_test_paths directly for testing convenience - let opt_v = if select_files_pref_enabled() { + let opt_v = if pref!(dom.testing.html_input_element.select_files.enabled) { opt_test_paths } else { self.query_files_from_embedder(patterns, true, embedder_proxy) @@ -740,13 +739,6 @@ impl FileManagerStore { } } -fn select_files_pref_enabled() -> bool { - PREFS - .get("dom.testing.htmlinputelement.select_files.enabled") - .as_boolean() - .unwrap_or(false) -} - fn read_file_in_chunks( sender: &IpcSender<FileManagerResult<ReadFileProgress>>, file: &mut File, |