chromium/components/segmentation_platform/internal/execution/processing/sync_device_info_observer.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/segmentation_platform/internal/execution/processing/sync_device_info_observer.h"

#include <optional>

#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/stringprintf.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "components/segmentation_platform/internal/execution/processing/feature_processor_state.h"
#include "components/segmentation_platform/public/types/processed_value.h"
#include "components/sync_device_info/device_info.h"
#include "components/sync_device_info/device_info_tracker.h"

namespace segmentation_platform::processing {

OsType;
FormFactor;

namespace {

constexpr int kActiveDaysThresholdForMetrics =;
constexpr int kActiveDayThresholdForInputDelegate =;

#define AS_FLOAT_VAL(x)

base::TimeDelta GetActivePeriodForMetrics() {}

base::TimeDelta Age(base::Time last_update, base::Time now) {}

// Determines if a device with |last_update| timestamp should be considered
// active, given the current time.
bool IsDeviceActive(base::Time last_update,
                    base::Time now,
                    std::optional<base::TimeDelta> active_threshold) {}

// Keep the following in sync with variants in
// //tools/metrics/histograms/metadata/segmentation_platform/histograms.xml.
const char* ConvertOsTypeToString(OsType os_type) {}

}  // namespace

BASE_FEATURE();

SyncDeviceInfoObserver::SyncDeviceInfoObserver(
    syncer::DeviceInfoTracker* device_info_tracker)
    :{}

SyncDeviceInfoObserver::~SyncDeviceInfoObserver() {}

// Count device by os types and record them in UMA only if not recorded yet.
void SyncDeviceInfoObserver::OnDeviceInfoChange() {}

std::map<OsType, int> SyncDeviceInfoObserver::CountActiveDevicesByOsType(
    base::TimeDelta active_threshold) const {}

void SyncDeviceInfoObserver::Process(
    const proto::CustomInput& input,
    FeatureProcessorState& feature_processor_state,
    ProcessedCallback callback) {}

void SyncDeviceInfoObserver::ReadyToFinishProcessing(
    const proto::CustomInput& input,
    scoped_refptr<InputContext> input_context,
    ProcessedCallback callback,
    bool success) {}

void SyncDeviceInfoObserver::OnTimeout() {}

}  // namespace segmentation_platform::processing