#include "chrome/browser/sync/test/integration/themes_helper.h"
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/sync_extension_helper.h"
#include "chrome/browser/themes/theme_helper.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "components/crx_file/id_util.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/manifest.h"
namespace {
std::string MakeName(int index) { … }
ThemeService* GetThemeService(Profile* profile) { … }
bool UsingSystemThemeFunc(ThemeService* theme_service) { … }
bool UsingDefaultThemeFunc(ThemeService* theme_service) { … }
bool UsingCustomThemeFunc(ThemeService* theme_service) { … }
}
namespace themes_helper {
bool IsSystemThemeDistinctFromDefaultTheme(Profile* profile) { … }
std::string GetCustomTheme(int index) { … }
std::string GetThemeID(Profile* profile) { … }
bool UsingCustomTheme(Profile* profile) { … }
bool UsingDefaultTheme(Profile* profile) { … }
bool UsingSystemTheme(Profile* profile) { … }
bool ThemeIsPendingInstall(Profile* profile, const std::string& id) { … }
void UseCustomTheme(Profile* profile, int index) { … }
void UseDefaultTheme(Profile* profile) { … }
void UseSystemTheme(Profile* profile) { … }
}
ThemePendingInstallChecker::ThemePendingInstallChecker(Profile* profile,
const std::string& theme)
: … { … }
ThemePendingInstallChecker::~ThemePendingInstallChecker() = default;
bool ThemePendingInstallChecker::IsExitConditionSatisfied(std::ostream* os) { … }
ThemeConditionChecker::ThemeConditionChecker(
Profile* profile,
const std::string& debug_message,
const base::RepeatingCallback<bool(ThemeService*)>& exit_condition)
: … { … }
ThemeConditionChecker::~ThemeConditionChecker() { … }
bool ThemeConditionChecker::IsExitConditionSatisfied(std::ostream* os) { … }
void ThemeConditionChecker::OnThemeChanged() { … }
SystemThemeChecker::SystemThemeChecker(Profile* profile)
: … { … }
DefaultThemeChecker::DefaultThemeChecker(Profile* profile)
: … { … }
CustomThemeChecker::CustomThemeChecker(Profile* profile)
: … { … }