#include "components/language/content/browser/geo_language_provider.h"
#include "base/functional/bind.h"
#include "base/memory/singleton.h"
#include "base/no_destructor.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/time/time.h"
#include "base/values.h"
#include "components/language/content/browser/language_code_locator_provider.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/device_service.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/device/public/cpp/geolocation/geoposition.h"
#include "services/device/public/mojom/geolocation_client_id.mojom.h"
namespace language {
namespace {
constexpr base::TimeDelta kMinUpdatePeriod = …;
GeoLanguageProvider::Binder& GetBinderOverride() { … }
}
const char GeoLanguageProvider::kCachedGeoLanguagesPref[] = …;
const char GeoLanguageProvider::kTimeOfLastGeoLanguagesUpdatePref[] = …;
GeoLanguageProvider::GeoLanguageProvider()
: … { … }
GeoLanguageProvider::GeoLanguageProvider(
scoped_refptr<base::SequencedTaskRunner> background_task_runner)
: … { … }
GeoLanguageProvider::~GeoLanguageProvider() = default;
GeoLanguageProvider* GeoLanguageProvider::GetInstance() { … }
void GeoLanguageProvider::RegisterLocalStatePrefs(
PrefRegistrySimple* const registry) { … }
void GeoLanguageProvider::StartUp(PrefService* const prefs) { … }
std::vector<std::string> GeoLanguageProvider::CurrentGeoLanguages() const { … }
void GeoLanguageProvider::OverrideBinderForTesting(Binder binder) { … }
void GeoLanguageProvider::BackgroundStartUp() { … }
void GeoLanguageProvider::BindIpGeolocationService() { … }
void GeoLanguageProvider::QueryNextPosition() { … }
void GeoLanguageProvider::OnIpGeolocationResponse(
device::mojom::GeopositionResultPtr result) { … }
void GeoLanguageProvider::LookupAndSetLanguages(double lat, double lon) { … }
void GeoLanguageProvider::SetGeoLanguages(
const std::vector<std::string>& languages) { … }
}