#include "chrome/browser/predictors/predictor_database.h"
#include <cstdint>
#include <memory>
#include "base/check.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/metrics/histogram_functions.h"
#include "base/numerics/safe_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/timer/timer.h"
#include "chrome/browser/predictors/autocomplete_action_predictor_table.h"
#include "chrome/browser/predictors/loading_predictor_config.h"
#include "chrome/browser/predictors/resource_prefetch_predictor.h"
#include "chrome/browser/predictors/resource_prefetch_predictor_tables.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/browser_thread.h"
#include "sql/database.h"
BrowserThread;
namespace {
const base::FilePath::CharType kPredictorDatabaseName[] = …);
void ReportUMA(const base::FilePath file_path) { … }
}
namespace predictors {
class PredictorDatabaseInternal
: public base::RefCountedThreadSafe<PredictorDatabaseInternal> { … };
PredictorDatabaseInternal::PredictorDatabaseInternal(
Profile* profile,
scoped_refptr<base::SequencedTaskRunner> db_task_runner)
: … { … }
PredictorDatabaseInternal::~PredictorDatabaseInternal() { … }
void PredictorDatabaseInternal::Initialize() { … }
void PredictorDatabaseInternal::SetCancelled() { … }
void PredictorDatabaseInternal::LogDatabaseStats() { … }
PredictorDatabase::PredictorDatabase(
Profile* profile,
scoped_refptr<base::SequencedTaskRunner> db_task_runner)
: … { … }
PredictorDatabase::~PredictorDatabase() { … }
void PredictorDatabase::Shutdown() { … }
scoped_refptr<AutocompleteActionPredictorTable>
PredictorDatabase::autocomplete_table() { … }
scoped_refptr<ResourcePrefetchPredictorTables>
PredictorDatabase::resource_prefetch_tables() { … }
sql::Database* PredictorDatabase::GetDatabase() { … }
}