#include "chrome/browser/webdata_services/web_data_service_factory.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/no_destructor.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/sql_init_error_message_ids.h"
#include "chrome/browser/ui/profiles/profile_error_dialog.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "components/plus_addresses/webdata/plus_address_webdata_service.h"
#include "components/search_engines/keyword_web_data_service.h"
#include "components/signin/public/webdata/token_web_data.h"
#include "components/webdata_services/web_data_service_wrapper.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
namespace {
ProfileErrorType ProfileErrorFromWebDataServiceWrapperError(
WebDataServiceWrapper::ErrorType error_type) { … }
void ProfileErrorCallback(WebDataServiceWrapper::ErrorType error_type,
sql::InitStatus status,
const std::string& diagnostics) { … }
std::unique_ptr<KeyedService> BuildWebDataService(
content::BrowserContext* context) { … }
}
WebDataServiceFactory::WebDataServiceFactory() = default;
WebDataServiceFactory::~WebDataServiceFactory() = default;
WebDataServiceWrapper* WebDataServiceFactory::GetForProfile(
Profile* profile,
ServiceAccessType access_type) { … }
WebDataServiceWrapper* WebDataServiceFactory::GetForProfileIfExists(
Profile* profile,
ServiceAccessType access_type) { … }
scoped_refptr<autofill::AutofillWebDataService>
WebDataServiceFactory::GetAutofillWebDataForProfile(
Profile* profile,
ServiceAccessType access_type) { … }
scoped_refptr<autofill::AutofillWebDataService>
WebDataServiceFactory::GetAutofillWebDataForAccount(
Profile* profile,
ServiceAccessType access_type) { … }
scoped_refptr<KeywordWebDataService>
WebDataServiceFactory::GetKeywordWebDataForProfile(
Profile* profile,
ServiceAccessType access_type) { … }
scoped_refptr<plus_addresses::PlusAddressWebDataService>
WebDataServiceFactory::GetPlusAddressWebDataForProfile(
Profile* profile,
ServiceAccessType access_type) { … }
scoped_refptr<TokenWebData> WebDataServiceFactory::GetTokenWebDataForProfile(
Profile* profile,
ServiceAccessType access_type) { … }
WebDataServiceFactory* WebDataServiceFactory::GetInstance() { … }
BrowserContextKeyedServiceFactory::TestingFactory
WebDataServiceFactory::GetDefaultFactory() { … }
content::BrowserContext* WebDataServiceFactory::GetBrowserContextToUse(
content::BrowserContext* context) const { … }
std::unique_ptr<KeyedService>
WebDataServiceFactory::BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const { … }
bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { … }