#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/font_family_cache.h"
#include <stddef.h>
#include <map>
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/font_pref_change_notifier_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_font_webkit_names.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
const char kFontFamilyCacheKey[] = …;
FontFamilyCache::FontFamilyCache(Profile* profile)
: … { … }
FontFamilyCache::~FontFamilyCache() = default;
void FontFamilyCache::FillFontFamilyMap(
Profile* profile,
const char* map_name,
blink::web_pref::ScriptFontFamilyMap* map) { … }
void FontFamilyCache::FillFontFamilyMap(
const char* map_name,
blink::web_pref::ScriptFontFamilyMap* map) { … }
std::u16string FontFamilyCache::FetchFont(const char* script,
const char* map_name) { … }
std::u16string FontFamilyCache::FetchAndCacheFont(const char* script,
const char* map_name) { … }
void FontFamilyCache::OnPrefsChanged(const std::string& pref_name) { … }