chromium/components/history/core/browser/url_row.h

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

#ifndef COMPONENTS_HISTORY_CORE_BROWSER_URL_ROW_H_
#define COMPONENTS_HISTORY_CORE_BROWSER_URL_ROW_H_

#include <stdint.h>

#include <optional>
#include <string>
#include <vector>

#include "base/memory/raw_ref.h"
#include "base/time/time.h"
#include "components/query_parser/snippet.h"
#include "url/gurl.h"

namespace history {

URLID;

// Holds all information globally associated with one URL (one row in the
// URL table).
class URLRow {};
URLRows;

// Annotations -----------------------------------------------------------------

// A set of binary state related to a page visit. To be used for bit masking
// operations.
//
// These values are persisted in database. Entries should not be renumbered and
// numeric values should never be reused.
enum VisitContentAnnotationFlag : uint64_t {};

VisitContentAnnotationFlags;

// A structure containing annotations computed by ML models to page content
// for a visit. Be cautious when changing the default values as they may already
// have been written to the storage.
struct VisitContentModelAnnotations {};

// A structure containing the annotations made to page content for a visit.
//
// Note: only `page_language`, `password_state`, `has_url_keyed_image`,
// `related_searches` and `model_annotations.categories` are being synced to
// remote devices; other fields should not be synced without auditing the usages
// ( e.g. `BrowsingTopicsCalculator` is currently assuming that a visit entry
// comes from the local history as long as it is associated with a non-empty
// `annotation_flags`).
struct VisitContentAnnotations {};

class URLResult : public URLRow {};

}  // namespace history

#endif  // COMPONENTS_HISTORY_CORE_BROWSER_URL_ROW_H_