chromium/components/history/core/browser/visited_link_database.cc

// Copyright 2023 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/history/core/browser/visited_link_database.h"

#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/database_utils/url_converter.h"
#include "components/url_formatter/url_formatter.h"
#include "sql/statement.h"
#include "url/gurl.h"

// The VisitedLinkDatabase contains the following fields:
// `id` - the unique int64 ID assigned to this row.
// `link_url_id` - the unique URLID assigned to the row where this link url is
//               stored in the URLDatabase. ID is stored to avoid storing the
//               URL twice.
// `top_level_url` - the GURL of the top-level frame where the link url was
//                 visited from.
// `frame_url` - the GURL of the frame where the link was visited from.
// `visit_count` - the number of entries in the VisitDatabase corresponding to
//               this row (must exactly match the <link_url, top_level_url,
//               frame_url> partition key).
#define HISTORY_VISITED_LINK_ROW_FIELDS

namespace history {

VisitedLinkDatabase::VisitedLinkEnumerator::VisitedLinkEnumerator()
    :{}

VisitedLinkDatabase::VisitedLinkEnumerator::~VisitedLinkEnumerator() = default;

bool VisitedLinkDatabase::DropVisitedLinkTable() {}

bool VisitedLinkDatabase::VisitedLinkEnumerator::GetNextVisitedLink(
    VisitedLinkRow& r) {}

VisitedLinkDatabase::VisitedLinkDatabase() = default;

VisitedLinkDatabase::~VisitedLinkDatabase() = default;

// Convenience to fill a VisitedLinkRow. Must be in sync with the fields in
// HISTORY_VISITED_LINK_ROW_FIELDS.
void VisitedLinkDatabase::FillVisitedLinkRow(sql::Statement& s,
                                             VisitedLinkRow& i) {}

bool VisitedLinkDatabase::GetVisitedLinkRow(VisitedLinkID visited_link_id,
                                            VisitedLinkRow& info) {}

VisitedLinkID VisitedLinkDatabase::GetRowForVisitedLink(
    URLID link_url_id,
    const GURL& top_level_url,
    const GURL& frame_url,
    VisitedLinkRow& info) {}

bool VisitedLinkDatabase::UpdateVisitedLinkRowVisitCount(
    VisitedLinkID visited_link_id,
    int visit_count) {}

VisitedLinkID VisitedLinkDatabase::AddVisitedLink(URLID link_url_id,
                                                  const GURL& top_level_url,
                                                  const GURL& frame_url,
                                                  int visit_count) {}

bool VisitedLinkDatabase::DeleteVisitedLinkRow(VisitedLinkID id) {}

bool VisitedLinkDatabase::InitVisitedLinkEnumeratorForEverything(
    VisitedLinkEnumerator& enumerator) {}

bool VisitedLinkDatabase::CreateVisitedLinkTable() {}
}  // namespace history