chromium/components/offline_pages/core/offline_page_metadata_store.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/offline_pages/core/offline_page_metadata_store.h"

#include <utility>

#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/cstring_view.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "components/offline_pages/core/client_namespace_constants.h"
#include "components/offline_pages/core/offline_page_item.h"
#include "components/offline_pages/core/offline_store_types.h"
#include "components/offline_pages/core/offline_store_utils.h"
#include "sql/database.h"
#include "sql/meta_table.h"
#include "sql/statement.h"
#include "sql/transaction.h"

namespace offline_pages {

const int OfflinePageMetadataStore::kFirstPostLegacyVersion;
const int OfflinePageMetadataStore::kCurrentVersion;
const int OfflinePageMetadataStore::kCompatibleVersion;

namespace {

// This is a macro instead of a const so that
// it can be used inline in other SQL statements below.
#define OFFLINE_PAGES_TABLE_NAME

bool CreateOfflinePagesTable(sql::Database* db) {}

bool UpgradeWithQuery(sql::Database* db, const base::cstring_view upgrade_sql) {}

bool UpgradeFrom52(sql::Database* db) {}

bool UpgradeFrom53(sql::Database* db) {}

bool UpgradeFrom54(sql::Database* db) {}

bool UpgradeFrom55(sql::Database* db) {}

bool UpgradeFrom56(sql::Database* db) {}

bool UpgradeFrom57(sql::Database* db) {}

bool UpgradeFrom61(sql::Database* db) {}

bool CreatePageThumbnailsTable(sql::Database* db) {}

bool CreateLatestSchema(sql::Database* db) {}

// Upgrades the database from before the database version was stored in the
// MetaTable. This function should never need to be modified.
bool UpgradeFromLegacyVersion(sql::Database* db) {}

bool UpgradeFromVersion1ToVersion2(sql::Database* db,
                                   sql::MetaTable* meta_table) {}

bool UpgradeFromVersion2ToVersion3(sql::Database* db,
                                   sql::MetaTable* meta_table) {}

bool UpgradeFromVersion3ToVersion4(sql::Database* db,
                                   sql::MetaTable* meta_table) {}

bool CreateSchema(sql::Database* db) {}

StoreState InitializationStatusToStoreState(
    SqlStoreBase::InitializationStatus status) {}

}  // anonymous namespace

OfflinePageMetadataStore::OfflinePageMetadataStore(
    scoped_refptr<base::SequencedTaskRunner> background_task_runner)
    :{}

OfflinePageMetadataStore::OfflinePageMetadataStore(
    scoped_refptr<base::SequencedTaskRunner> background_task_runner,
    const base::FilePath& path)
    :{}

OfflinePageMetadataStore::~OfflinePageMetadataStore() = default;

base::OnceCallback<bool(sql::Database* db)>
OfflinePageMetadataStore::GetSchemaInitializationFunction() {}

StoreState OfflinePageMetadataStore::GetStateForTesting() const {}

void OfflinePageMetadataStore::OnOpenStart(base::TimeTicks last_closing_time) {}

void OfflinePageMetadataStore::OnOpenDone(bool success) {}

void OfflinePageMetadataStore::OnTaskBegin(bool is_initialized) {}

void OfflinePageMetadataStore::OnTaskRunComplete() {}

void OfflinePageMetadataStore::OnTaskReturnComplete() {}

void OfflinePageMetadataStore::OnCloseStart(
    InitializationStatus status_before_close) {}

void OfflinePageMetadataStore::OnCloseComplete() {}

}  // namespace offline_pages