chromium/components/language/core/browser/url_language_histogram.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/language/core/browser/url_language_histogram.h"

#include <algorithm>
#include <map>
#include <set>

#include "components/prefs/pref_registry.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"

namespace language {

namespace {

const char kUrlLanguageHistogramCounters[] =;

const int kMaxCountersSum =;
const int kMinCountersSum =;
const float kCutoffRatio =;
const float kDiscountFactor =;

// Gets the sum of the counter for all languages in the histogram.
int GetCountersSum(const base::Value::Dict& dict) {}

// Removes languages with small counter values and discount remaining counters.
void DiscountAndCleanCounters(base::Value::Dict& dict) {}

// Transforms the counters from prefs into a list of LanguageInfo structs.
std::vector<UrlLanguageHistogram::LanguageInfo> GetAllLanguages(
    const base::Value::Dict& dict) {}

}  // namespace

UrlLanguageHistogram::UrlLanguageHistogram(PrefService* pref_service)
    :{}

UrlLanguageHistogram::~UrlLanguageHistogram() = default;

// static
void UrlLanguageHistogram::RegisterProfilePrefs(PrefRegistrySimple* registry) {}

std::vector<UrlLanguageHistogram::LanguageInfo>
UrlLanguageHistogram::GetTopLanguages() const {}

float UrlLanguageHistogram::GetLanguageFrequency(
    const std::string& language_code) const {}

void UrlLanguageHistogram::OnPageVisited(const std::string& language_code) {}

void UrlLanguageHistogram::ClearHistory(base::Time begin, base::Time end) {}

}  // namespace language