#include "chrome/browser/extensions/test_extension_prefs.h"
#include <memory>
#include <utility>
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/clock.h"
#include "base/time/time.h"
#include "base/values.h"
#include "chrome/browser/extensions/chrome_app_sorting.h"
#include "chrome/browser/extensions/test_extension_system.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/prefs/pref_service_syncable_util.h"
#include "chrome/common/chrome_constants.h"
#include "components/crx_file/id_util.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_value_store.h"
#include "components/sync/model/string_ordinal.h"
#include "components/sync_preferences/pref_service_mock_factory.h"
#include "components/sync_preferences/pref_service_syncable.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/extension_pref_store.h"
#include "extensions/browser/extension_pref_value_map.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_prefs_factory.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
BrowserThread;
ManifestLocation;
namespace extensions {
class TestExtensionPrefs::IncrementalClock : public base::Clock { … };
TestExtensionPrefs::TestExtensionPrefs(
const scoped_refptr<base::SequencedTaskRunner>& task_runner)
: … { … }
TestExtensionPrefs::~TestExtensionPrefs() { … }
ExtensionPrefs* TestExtensionPrefs::prefs() { … }
TestingProfile* TestExtensionPrefs::profile() { … }
PrefService* TestExtensionPrefs::pref_service() { … }
const scoped_refptr<user_prefs::PrefRegistrySyncable>&
TestExtensionPrefs::pref_registry() { … }
void TestExtensionPrefs::ResetPrefRegistry() { … }
void TestExtensionPrefs::RecreateExtensionPrefs() { … }
scoped_refptr<Extension> TestExtensionPrefs::AddExtension(
const std::string& name) { … }
scoped_refptr<Extension> TestExtensionPrefs::AddApp(const std::string& name) { … }
scoped_refptr<Extension> TestExtensionPrefs::AddExtensionWithLocation(
const std::string& name,
ManifestLocation location) { … }
scoped_refptr<Extension> TestExtensionPrefs::AddExtensionWithManifest(
const base::Value::Dict& manifest,
ManifestLocation location) { … }
scoped_refptr<Extension> TestExtensionPrefs::AddExtensionWithManifestAndFlags(
const base::Value::Dict& manifest,
ManifestLocation location,
int extra_flags) { … }
std::string TestExtensionPrefs::AddExtensionAndReturnId(
const std::string& name) { … }
void TestExtensionPrefs::AddExtension(const Extension* extension) { … }
std::unique_ptr<PrefService> TestExtensionPrefs::CreateIncognitoPrefService()
const { … }
void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) { … }
ChromeAppSorting* TestExtensionPrefs::app_sorting() { … }
void TestExtensionPrefs::AddDefaultManifestKeys(const std::string& name,
base::Value::Dict& dict) { … }
}