Refactor util::prefs operations to be methods on static struct.

This commit is contained in:
Corey Farwell 2016-07-02 13:51:17 -04:00
parent 307844a8c1
commit 22928f50ac
30 changed files with 166 additions and 162 deletions

View file

@ -24,7 +24,7 @@ use string_cache::Atom;
use style::font_face::{EffectiveSources, Source};
use style::properties::longhands::font_family::computed_value::FontFamily;
use url::Url;
use util::prefs;
use util::prefs::PREFS;
use util::thread::spawn_named;
use webrender_traits;
@ -456,7 +456,7 @@ impl FontCacheThread {
// derived from http://stackoverflow.com/a/10864297/3830
fn is_supported_font_type(toplevel: &TopLevel, sublevel: &SubLevel) -> bool {
if !prefs::get_pref("network.mime.sniff").as_boolean().unwrap_or(false) {
if !PREFS.get("network.mime.sniff").as_boolean().unwrap_or(false) {
return true;
}