#include "services/screen_ai/public/cpp/utilities.h"
#include "base/check_is_test.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/version.h"
#include "build/build_config.h"
#include "components/component_updater/component_updater_paths.h"
#include "ui/accessibility/accessibility_features.h"
namespace screen_ai {
namespace {
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
constexpr char kBinaryPathSwitch[] = …;
#endif
const base::FilePath::CharType kScreenAISubDirName[] = …);
const base::FilePath::CharType kScreenAIComponentBinaryName[] = …FILE_PATH_LITERAL("chrome_screen_ai.dll");
#else
FILE_PATH_LITERAL("libchromescreenai.so");
#endif
#if BUILDFLAG(IS_CHROMEOS)
constexpr char kScreenAIDlcRootPath[] =
"/run/imageloader/screen-ai/package/root/";
#endif
#if BUILDFLAG(ENABLE_SCREEN_AI_BROWSERTESTS)
#if BUILDFLAG(IS_LINUX)
constexpr base::FilePath::CharType kScreenAIResourcePathForTests[] = …);
#elif BUILDFLAG(IS_MAC)
#if defined(ARCH_CPU_X86_64)
constexpr base::FilePath::CharType kScreenAIResourcePathForTests[] =
FILE_PATH_LITERAL("third_party/screen-ai/macos_amd64/resources");
#elif defined(ARCH_CPU_ARM64)
constexpr base::FilePath::CharType kScreenAIResourcePathForTests[] =
FILE_PATH_LITERAL("third_party/screen-ai/macos_arm64/resources");
#endif
#elif BUILDFLAG(IS_WIN)
#if defined(ARCH_CPU_X86_64)
constexpr base::FilePath::CharType kScreenAIResourcePathForTests[] =
FILE_PATH_LITERAL("third_party\\screen-ai\\windows_amd64\\resources");
#elif defined(ARCH_CPU_X86)
constexpr base::FilePath::CharType kScreenAIResourcePathForTests[] =
FILE_PATH_LITERAL("third_party\\screen-ai\\windows_386\\resources");
#endif
#endif
base::FilePath GetTestComponentDir() { … }
#endif
}
base::FilePath GetRelativeInstallDir() { … }
base::FilePath GetComponentBinaryFileName() { … }
base::FilePath GetComponentDir() { … }
#if BUILDFLAG(ENABLE_SCREEN_AI_BROWSERTESTS)
base::FilePath GetComponentBinaryPathForTests() { … }
#endif
const char* GetBinaryPathSwitch() { … }
}