#include "components/search_engines/keyword_web_data_service.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/task/sequenced_task_runner.h"
#include "build/build_config.h"
#include "components/search_engines/keyword_table.h"
#include "components/search_engines/template_url_data.h"
#include "components/webdata/common/web_data_results.h"
#include "components/webdata/common/web_database.h"
#include "components/webdata/common/web_database_service.h"
namespace {
WebDatabase::State PerformKeywordOperationsImpl(
const KeywordTable::Operations& operations,
WebDatabase* db) { … }
std::unique_ptr<WDTypedResult> GetKeywordsImpl(WebDatabase* db) { … }
WebDatabase::State SetDefaultSearchProviderIDImpl(TemplateURLID id,
WebDatabase* db) { … }
WebDatabase::State SetBuiltinKeywordDataVersionImpl(int version,
WebDatabase* db) { … }
WebDatabase::State ClearBuiltinKeywordMilestoneImpl(WebDatabase* db) { … }
WebDatabase::State SetBuiltinKeywordCountryImpl(int country_id,
WebDatabase* db) { … }
WebDatabase::State SetStarterPackKeywordVersionImpl(int version,
WebDatabase* db) { … }
}
WDKeywordsResult::WDKeywordsResult() = default;
WDKeywordsResult::WDKeywordsResult(const WDKeywordsResult&) = default;
WDKeywordsResult& WDKeywordsResult::operator=(const WDKeywordsResult&) =
default;
WDKeywordsResult::~WDKeywordsResult() = default;
KeywordWebDataService::BatchModeScoper::BatchModeScoper(
KeywordWebDataService* service)
: … { … }
KeywordWebDataService::BatchModeScoper::~BatchModeScoper() { … }
KeywordWebDataService::KeywordWebDataService(
scoped_refptr<WebDatabaseService> wdbs,
scoped_refptr<base::SequencedTaskRunner> ui_task_runner)
: … { … }
void KeywordWebDataService::AddKeyword(const TemplateURLData& data) { … }
void KeywordWebDataService::RemoveKeyword(TemplateURLID id) { … }
void KeywordWebDataService::UpdateKeyword(const TemplateURLData& data) { … }
WebDataServiceBase::Handle KeywordWebDataService::GetKeywords(
WebDataServiceConsumer* consumer) { … }
void KeywordWebDataService::SetDefaultSearchProviderID(TemplateURLID id) { … }
void KeywordWebDataService::SetBuiltinKeywordDataVersion(int version) { … }
void KeywordWebDataService::ClearBuiltinKeywordMilestone() { … }
void KeywordWebDataService::SetBuiltinKeywordCountry(int version) { … }
void KeywordWebDataService::SetStarterPackKeywordVersion(int version) { … }
void KeywordWebDataService::ShutdownOnUISequence() { … }
KeywordWebDataService::~KeywordWebDataService() { … }
void KeywordWebDataService::AdjustBatchModeLevel(bool entering_batch_mode) { … }
void KeywordWebDataService::CommitQueuedOperations() { … }