#include "components/history/core/browser/visitsegment_database.h"
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <memory>
#include <string>
#include <string_view>
#include <vector>
#include "base/check_op.h"
#include "base/functional/callback.h"
#include "base/strings/string_util.h"
#include "components/history/core/browser/page_usage_data.h"
#include "sql/statement.h"
#include "sql/transaction.h"
namespace history {
VisitSegmentDatabase::VisitSegmentDatabase() { … }
VisitSegmentDatabase::~VisitSegmentDatabase() { … }
bool VisitSegmentDatabase::InitSegmentTables() { … }
bool VisitSegmentDatabase::DropSegmentTables() { … }
std::string VisitSegmentDatabase::ComputeSegmentName(const GURL& url) { … }
SegmentID VisitSegmentDatabase::GetSegmentNamed(
const std::string& segment_name) { … }
bool VisitSegmentDatabase::UpdateSegmentRepresentationURL(SegmentID segment_id,
URLID url_id) { … }
SegmentID VisitSegmentDatabase::CreateSegment(URLID url_id,
const std::string& segment_name) { … }
bool VisitSegmentDatabase::UpdateSegmentVisitCount(SegmentID segment_id,
base::Time ts,
int amount) { … }
std::vector<std::unique_ptr<PageUsageData>>
VisitSegmentDatabase::QuerySegmentUsage(
int max_result_count,
const base::RepeatingCallback<bool(const GURL&)>& url_filter) { … }
bool VisitSegmentDatabase::DeleteSegmentDataOlderThan(base::Time older_than) { … }
bool VisitSegmentDatabase::DeleteSegmentForURL(URLID url_id) { … }
bool VisitSegmentDatabase::MigratePresentationIndex() { … }
bool VisitSegmentDatabase::MigrateVisitSegmentNames() { … }
bool VisitSegmentDatabase::RenameSegment(SegmentID segment_id,
const std::string& new_name) { … }
bool VisitSegmentDatabase::MergeSegments(SegmentID from_segment_id,
SegmentID to_segment_id) { … }
}