#include "sql/recovery.h"
#include <stddef.h>
#include <string>
#include <tuple>
#include "base/check.h"
#include "base/check_op.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "build/build_config.h"
#include "sql/database.h"
#include "sql/error_delegate_util.h"
#include "sql/internal_api_token.h"
#include "sql/meta_table.h"
#include "sql/sqlite_result_code.h"
#include "third_party/sqlite/sqlite3.h"
namespace sql {
namespace {
constexpr char kMainDatabaseName[] = …;
}
bool Recovery::ShouldAttemptRecovery(Database* database, int extended_error) { … }
SqliteResultCode Recovery::RecoverDatabase(Database* database,
Strategy strategy) { … }
bool Recovery::RecoverIfPossible(Database* database,
int extended_error,
Strategy strategy) { … }
Recovery::Recovery(Database* database, Strategy strategy)
: … { … }
Recovery::~Recovery() { … }
void Recovery::SetRecoverySucceeded() { … }
void Recovery::SetRecoveryFailed(Result failure_result,
SqliteResultCode result_code) { … }
SqliteResultCode Recovery::RecoverAndReplaceDatabase() { … }
SqliteResultCode Recovery::AttemptToRecoverDatabaseToBackup() { … }
SqliteResultCode Recovery::ReplaceOriginalWithRecoveredDb() { … }
bool Recovery::RecoveredDbHasValidMetaTable() { … }
}