#include "components/feed/core/v2/scheduling.h"
#include "base/json/values_util.h"
#include "base/time/time.h"
#include "base/types/cxx23_to_underlying.h"
#include "base/values.h"
#include "components/feed/core/v2/config.h"
#include "components/feed/core/v2/feedstore_util.h"
#include "components/feed/feed_feature_list.h"
namespace feed {
namespace {
base::Value::List VectorToList(const std::vector<base::TimeDelta>& values) { … }
bool ListToVector(const base::Value::List& value,
std::vector<base::TimeDelta>* result) { … }
base::TimeDelta GetThresholdTime(base::TimeDelta default_threshold,
base::TimeDelta server_threshold) { … }
RequestSchedule::Type GetScheduleType(const base::Value* value) { … }
}
RequestSchedule::RequestSchedule() = default;
RequestSchedule::~RequestSchedule() = default;
RequestSchedule::RequestSchedule(const RequestSchedule&) = default;
RequestSchedule& RequestSchedule::operator=(const RequestSchedule&) = default;
RequestSchedule::RequestSchedule(RequestSchedule&&) = default;
RequestSchedule& RequestSchedule::operator=(RequestSchedule&&) = default;
base::Value::Dict RequestScheduleToDict(const RequestSchedule& schedule) { … }
RequestSchedule RequestScheduleFromDict(const base::Value::Dict& value) { … }
base::Time NextScheduledRequestTime(base::Time now, RequestSchedule* schedule) { … }
bool ShouldWaitForNewContent(const feedstore::Metadata& metadata,
const StreamType& stream_type,
base::TimeDelta content_age,
bool is_web_feed_subscriber) { … }
bool ContentInvalidFromAge(const feedstore::Metadata& metadata,
const StreamType& stream_type,
base::TimeDelta content_age,
bool is_web_feed_subscriber) { … }
}