#include "chrome/browser/enterprise/connectors/device_trust/signals/decorators/browser/browser_signals_decorator.h"
#include <functional>
#include <utility>
#include "base/barrier_closure.h"
#include "base/check.h"
#include "base/task/thread_pool.h"
#include "base/values.h"
#include "chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/metrics_utils.h"
#include "chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/signals_utils.h"
#include "chrome/browser/enterprise/signals/device_info_fetcher.h"
#include "chrome/browser/enterprise/signals/signals_common.h"
#include "components/device_signals/core/browser/signals_aggregator.h"
#include "components/device_signals/core/browser/signals_types.h"
#include "components/device_signals/core/common/common_types.h"
#include "components/device_signals/core/common/signals_constants.h"
#include "components/enterprise/core/dependency_factory.h"
#include "components/policy/core/common/cloud/cloud_policy_manager.h"
#include "components/policy/core/common/cloud/cloud_policy_store.h"
#include "components/policy/proto/device_management_backend.pb.h"
namespace enterprise_connectors {
namespace {
constexpr char kLatencyHistogramVariant[] = …;
std::optional<std::string> TryGetEnrollmentDomain(
policy::CloudPolicyManager* manager) { … }
}
BrowserSignalsDecorator::BrowserSignalsDecorator(
policy::CloudPolicyManager* browser_cloud_policy_manager,
std::unique_ptr<enterprise_core::DependencyFactory> dependency_factory,
device_signals::SignalsAggregator* signals_aggregator)
: … { … }
BrowserSignalsDecorator::~BrowserSignalsDecorator() = default;
void BrowserSignalsDecorator::Decorate(base::Value::Dict& signals,
base::OnceClosure done_closure) { … }
void BrowserSignalsDecorator::OnDeviceInfoFetched(
base::Value::Dict& signals,
base::OnceClosure done_closure,
const enterprise_signals::DeviceInfo& device_info) { … }
void BrowserSignalsDecorator::OnAggregatedSignalsReceived(
base::Value::Dict& signals,
base::OnceClosure done_closure,
device_signals::SignalsAggregationResponse response) { … }
void BrowserSignalsDecorator::OnAllSignalsReceived(
base::TimeTicks start_time,
base::OnceClosure done_closure) { … }
}