#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/extensions/preinstalled_apps.h"
#include <stddef.h>
#include <memory>
#include <set>
#include <string>
#include "base/lazy_instance.h"
#include "base/strings/string_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_applications/preinstalled_app_install_features.h"
#include "chrome/browser/web_applications/preinstalled_web_app_utils.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/version_info/version_info.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
namespace {
bool IsOldPreinstalledApp(const std::string& extension_id) { … }
bool IsLocaleSupported() { … }
base::LazyInstance<std::set<Profile*>>::Leaky g_perform_new_installation = …;
}
namespace preinstalled_apps {
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { … }
bool Provider::DidPerformNewInstallationForProfile(Profile* profile) { … }
void Provider::InitProfileState() { … }
Provider::Provider(Profile* profile,
VisitorInterface* service,
scoped_refptr<extensions::ExternalLoader> loader,
extensions::mojom::ManifestLocation crx_location,
extensions::mojom::ManifestLocation download_location,
int creation_flags)
: … { … }
void Provider::VisitRegisteredExtension() { … }
void Provider::SetPrefs(base::Value::Dict prefs) { … }
}