chromium/components/feed/core/v2/public/types.h

// Copyright 2020 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_FEED_CORE_V2_PUBLIC_TYPES_H_
#define COMPONENTS_FEED_CORE_V2_PUBLIC_TYPES_H_

#include <iosfwd>
#include <optional>
#include <string>
#include <string_view>
#include <vector>

#include "base/time/time.h"
#include "base/types/id_type.h"
#include "base/version.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/version_info/channel.h"
#include "url/gurl.h"

namespace feed {

// Information about the user account. Currently, for Feed purposes, we use
// account information only when the user is signed-in with Sync enabled. If
// Sync is disabled, AccountInfo should be empty.
struct AccountInfo {};
std::ostream& operator<<(std::ostream& os, const AccountInfo& o);

enum class RefreshTaskId {};

enum class AccountTokenFetchStatus {};

// Information about the Chrome build and feature flags.
struct ChromeInfo {};
// Device display metrics.
struct DisplayMetrics {};

// A unique ID for an ephemeral change.
EphemeralChangeId;
SurfaceId;
ImageFetchId;

struct NetworkResponseInfo {};

std::ostream& operator<<(std::ostream& os, const NetworkResponseInfo& o);

struct NetworkResponse {};

// For the snippets-internals page.
struct DebugStreamData {};

std::string SerializeDebugStreamData(const DebugStreamData& data);
std::optional<DebugStreamData> DeserializeDebugStreamData(
    std::string_view base64_encoded);

// Information about a web page which may be used to determine an associated
// web feed.
class WebFeedPageInformation {};
std::ostream& operator<<(std::ostream& os, const WebFeedPageInformation& value);

// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.feed.webfeed
enum class WebFeedSubscriptionStatus {};
std::ostream& operator<<(std::ostream& out, WebFeedSubscriptionStatus value);

// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.feed.webfeed
enum class WebFeedAvailabilityStatus {};
std::ostream& operator<<(std::ostream& out, WebFeedAvailabilityStatus value);

// Information about a web feed.
struct WebFeedMetadata {};
std::ostream& operator<<(std::ostream& out, const WebFeedMetadata& value);

// This must be kept in sync with WebFeedSubscriptionRequestStatus in
// enums.xml. These values are persisted to logs. Entries should not be
// renumbered and numeric values should never be reused.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.feed.webfeed
enum class WebFeedSubscriptionRequestStatus {};
std::ostream& operator<<(std::ostream& out,
                         WebFeedSubscriptionRequestStatus value);

// This must be kept in sync with WebFeedQueryRequestStatus in
// enums.xml. These values are persisted to logs. Entries should not be
// renumbered and numeric values should never be reused.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.feed.webfeed
enum class WebFeedQueryRequestStatus {};
std::ostream& operator<<(std::ostream& out, WebFeedQueryRequestStatus value);

NetworkRequestId;

// Values for the UMA
// ContentSuggestions.Feed.WebFeed.PageInformationRequested histogram.
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused. This must be kept in sync with
// WebFeedPageInformationRequestReason in enums.xml.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.feed.webfeed
enum class WebFeedPageInformationRequestReason : int {};

// Values for feed type
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.feed
enum class StreamKind : int {};

// Singe Web entry points
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.feed
enum class SingleWebFeedEntryPoint : int {};
std::ostream& operator<<(std::ostream& out, SingleWebFeedEntryPoint value);

// For testing and debugging only.
std::ostream& operator<<(std::ostream& out,
                         WebFeedPageInformationRequestReason value);

// Used to tell how to open an URL.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.feed
enum class OpenActionType : int {};

// Describes how tab group feature is enabled.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.feed
enum class TabGroupEnabledState : int {};

}  // namespace feed

#endif  // COMPONENTS_FEED_CORE_V2_PUBLIC_TYPES_H_