chromium/components/metrics/data_use_tracker.cc

// Copyright 2016 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/metrics/data_use_tracker.h"

#include <memory>
#include <string>

#include "base/i18n/time_formatting.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/metrics/metrics_pref_names.h"
#include "components/prefs/scoped_user_pref_update.h"

namespace metrics {

namespace {

// Default weekly quota and allowed UMA ratio for UMA log uploads for Android.
// These defaults will not be used for non-Android as |DataUseTracker| will not
// be initialized.
const int kDefaultUMAWeeklyQuotaBytes =;  // 200KB.
const double kDefaultUMARatio =;

}  // namespace

DataUseTracker::DataUseTracker(PrefService* local_state)
    :{}

DataUseTracker::~DataUseTracker() {}

// static
std::unique_ptr<DataUseTracker> DataUseTracker::Create(
    PrefService* local_state) {}

// static
void DataUseTracker::RegisterPrefs(PrefRegistrySimple* registry) {}

// static
void DataUseTracker::UpdateMetricsUsagePrefs(int message_size,
                                             bool is_cellular,
                                             bool is_metrics_service_usage,
                                             PrefService* local_state) {}

void DataUseTracker::UpdateMetricsUsagePrefsInternal(
    int message_size,
    bool is_cellular,
    bool is_metrics_service_usage) {}

bool DataUseTracker::ShouldUploadLogOnCellular(int log_bytes) {}

void DataUseTracker::UpdateUsagePref(const std::string& pref_name,
                                     int message_size) {}

void DataUseTracker::RemoveExpiredEntries() {}

void DataUseTracker::RemoveExpiredEntriesForPref(const std::string& pref_name) {}

// Note: We compute total data use regardless of what is the current date. In
// scenario when user travels back in time zone and current date becomes earlier
// than latest registered date in perf, we still count that in total use as user
// actually used that data.
int DataUseTracker::ComputeTotalDataUse(const std::string& pref_name) {}

base::Time DataUseTracker::GetCurrentMeasurementDate() const {}

std::string DataUseTracker::GetCurrentMeasurementDateAsString() const {}

}  // namespace metrics