chromium/chrome/browser/font_family_cache.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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"

// Identifies the user data on the profile.
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) {}

// There are ~1000 entries in the cache. Avoid unnecessary object construction,
// including std::string.
void FontFamilyCache::OnPrefsChanged(const std::string& pref_name) {}