chromium/components/feed/core/v2/enums.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_ENUMS_H_
#define COMPONENTS_FEED_CORE_V2_ENUMS_H_

#include <iosfwd>
#include <string_view>

namespace feed {

// One value for each network API method used by the feed.
enum class NetworkRequestType : int {};
std::ostream& operator<<(std::ostream& out, NetworkRequestType value);

// Denotes how the stream content loading is used for.
enum class LoadType {};

// This must be kept in sync with FeedLoadStreamStatus 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.v2
enum class LoadStreamStatus {};

// Were we able to load fresh Feed data. This should be 'true' unless some kind
// of error occurred.
bool IsLoadingSuccessfulAndFresh(LoadStreamStatus status);

std::ostream& operator<<(std::ostream& out, LoadStreamStatus value);

// Keep this in sync with FeedUploadActionsStatus in enums.xml.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.feed.v2
enum class UploadActionsStatus {};

// Keep this in sync with FeedUploadActionsBatchStatus in enums.xml.
enum class UploadActionsBatchStatus {};

std::ostream& operator<<(std::ostream& out, UploadActionsStatus value);
std::ostream& operator<<(std::ostream& out, UploadActionsBatchStatus value);

// This must be kept in sync with WebFeedRefreshStatus in enums.xml.
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
// Status of updating recommended or subscribed web feeds.
enum class WebFeedRefreshStatus {};
std::ostream& operator<<(std::ostream& out, WebFeedRefreshStatus value);

// This must be kept in sync with FeedUserSettingsOnStart in enums.xml.
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
// Reports last known state of user settings which affect Feed content.
// This includes WAA (whether activity is recorded), and DP (whether
// Discover personalization is enabled).
enum class UserSettingsOnStart {};
std::string_view ToString(UserSettingsOnStart v);
std::ostream& operator<<(std::ostream& out, UserSettingsOnStart value);

}  // namespace feed

#endif  // COMPONENTS_FEED_CORE_V2_ENUMS_H_