#include "components/feed/core/v2/user_actions_collector.h"
#include <algorithm>
#include <cmath>
#include <string>
#include "base/base64.h"
#include "base/json/values_util.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/time/default_clock.h"
#include "base/time/time.h"
#include "components/feed/core/common/pref_names.h"
#include "components/feed/core/proto/v2/user_actions_store.pb.h"
#include "components/feed/core/v2/config.h"
#include "components/feed/core/v2/prefs.h"
#include "components/feed/core/v2/public/common_enums.h"
#include "components/feed/core/v2/public/feed_api.h"
#include "components/feed/feed_feature_list.h"
#include "components/prefs/pref_service.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace feed {
namespace {
int64_t TimeToPrefValue(const base::Time& time) { … }
base::Time PrefValueToTime(int64_t value) { … }
}
UserActionsCollector::UserActionsCollector(PrefService* profile_prefs)
: … { … }
UserActionsCollector::~UserActionsCollector() = default;
void UserActionsCollector::UpdateUserProfileOnLinkClick(
const GURL& url,
const std::vector<int64_t>& entity_mids) { … }
void UserActionsCollector::InitStoreFromPrefs() { … }
std::string UserActionsCollector::EntryToString(
const GURL& url,
const std::vector<int64_t>& entity_mids) const { … }
bool UserActionsCollector::ShouldIncludeVisitMetadataEntry(
const std::string& visit_metadata_serialized) const { … }
}