#include "components/search_engines/keyword_table.h"
#include <stddef.h>
#include <memory>
#include <set>
#include <string_view>
#include <tuple>
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "base/values.h"
#include "components/database_utils/url_converter.h"
#include "components/search_engines/search_terms_data.h"
#include "components/search_engines/template_url.h"
#include "components/webdata/common/web_database.h"
#include "sql/statement.h"
#include "sql/transaction.h"
#include "url/gurl.h"
Time;
constexpr char KeywordTable::kDefaultSearchProviderKey[] = …;
namespace {
constexpr char kBuiltinKeywordDataVersion[] = …;
constexpr char kBuiltinKeywordMilestone[] = …;
constexpr char kBuiltinKeywordCountry[] = …;
constexpr char kStarterPackKeywordVersion[] = …;
const std::string ColumnsForVersion(int version, bool concatenated) { … }
void BindURLToStatement(const TemplateURLData& data,
sql::Statement* s,
int id_column,
int starting_column) { … }
WebDatabaseTable::TypeKey GetKey() { … }
}
KeywordTable::KeywordTable() { … }
KeywordTable::~KeywordTable() { … }
KeywordTable* KeywordTable::FromWebDatabase(WebDatabase* db) { … }
WebDatabaseTable::TypeKey KeywordTable::GetTypeKey() const { … }
bool KeywordTable::CreateTablesIfNecessary() { … }
bool KeywordTable::MigrateToVersion(int version,
bool* update_compatible_version) { … }
bool KeywordTable::PerformOperations(const Operations& operations) { … }
bool KeywordTable::GetKeywords(Keywords* keywords) { … }
bool KeywordTable::SetDefaultSearchProviderID(int64_t id) { … }
int64_t KeywordTable::GetDefaultSearchProviderID() { … }
bool KeywordTable::SetBuiltinKeywordDataVersion(int version) { … }
int KeywordTable::GetBuiltinKeywordDataVersion() { … }
bool KeywordTable::ClearBuiltinKeywordMilestone() { … }
bool KeywordTable::SetBuiltinKeywordCountry(int country_id) { … }
int KeywordTable::GetBuiltinKeywordCountry() { … }
bool KeywordTable::SetStarterPackKeywordVersion(int version) { … }
int KeywordTable::GetStarterPackKeywordVersion() { … }
std::string KeywordTable::GetKeywordColumns() { … }
bool KeywordTable::MigrateToVersion53AddNewTabURLColumn() { … }
bool KeywordTable::MigrateToVersion59RemoveExtensionKeywords() { … }
bool KeywordTable::MigrateToVersion68RemoveShowInDefaultListColumn() { … }
bool KeywordTable::MigrateToVersion69AddLastVisitedColumn() { … }
bool KeywordTable::MigrateToVersion76RemoveInstantColumns() { … }
bool KeywordTable::MigrateToVersion77IncreaseTimePrecision() { … }
bool KeywordTable::MigrateToVersion82AddCreatedFromPlayApiColumn() { … }
bool KeywordTable::MigrateToVersion97AddIsActiveColumn() { … }
bool KeywordTable::MigrateToVersion103AddStarterPackIdColumn() { … }
bool KeywordTable::MigrateToVersion112AddEnforcedByPolicyColumn() { … }
bool KeywordTable::MigrateToVersion122AddSiteSearchPolicyColumns() { … }
bool KeywordTable::GetKeywordDataFromStatement(sql::Statement& s,
TemplateURLData* data) { … }
bool KeywordTable::AddKeyword(const TemplateURLData& data) { … }
bool KeywordTable::RemoveKeyword(TemplateURLID id) { … }
bool KeywordTable::UpdateKeyword(const TemplateURLData& data) { … }
bool KeywordTable::GetKeywordAsString(TemplateURLID id,
const std::string& table_name,
std::string* result) { … }