#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/extensions/chrome_component_extension_resource_manager.h"
#include <map>
#include <string>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/grit/chrome_unscaled_resources.h"
#include "chrome/grit/component_extension_resources_map.h"
#include "chrome/grit/theme_resources.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension_id.h"
#include "pdf/buildflags.h"
#include "ppapi/buildflags/buildflags.h"
#include "ui/base/resource/resource_bundle.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/keyboard/ui/resources/keyboard_resource_util.h"
#include "ash/webui/file_manager/untrusted_resources/grit/file_manager_untrusted_resources_map.h"
#include "base/command_line.h"
#include "chrome/browser/ash/file_manager/file_manager_string_util.h"
#include "chrome/browser/browser_process.h"
#include "ui/file_manager/grit/file_manager_gen_resources_map.h"
#include "ui/file_manager/grit/file_manager_resources_map.h"
#if BUILDFLAG(ENABLE_INK)
#include "chromeos/grit/chromeos_media_app_bundle_resources.h"
#endif
#endif
#if BUILDFLAG(ENABLE_PDF)
#include <utility>
#include "chrome/browser/pdf/pdf_extension_util.h"
#include "chrome/grit/pdf_resources_map.h"
#endif
namespace extensions {
class ChromeComponentExtensionResourceManager::Data { … };
ChromeComponentExtensionResourceManager::Data::Data() { … }
void ChromeComponentExtensionResourceManager::Data::AddComponentResourceEntries(
const webui::ResourcePath* entries,
size_t size) { … }
ChromeComponentExtensionResourceManager::
ChromeComponentExtensionResourceManager() = default;
ChromeComponentExtensionResourceManager::
~ChromeComponentExtensionResourceManager() = default;
bool ChromeComponentExtensionResourceManager::IsComponentExtensionResource(
const base::FilePath& extension_path,
const base::FilePath& resource_path,
int* resource_id) const { … }
const ui::TemplateReplacements*
ChromeComponentExtensionResourceManager::GetTemplateReplacementsForExtension(
const ExtensionId& extension_id) const { … }
void ChromeComponentExtensionResourceManager::LazyInitData() const { … }
}