blob: 4db43af88c7f7e4b6ba3d9aa5b2c4b7d03f1a6a0 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/macros.h"
#include "chromeos/timezone/timezone_resolver.h"
#include "components/prefs/pref_change_registrar.h"
class PrefService;
namespace chromeos {
namespace system {
class TimeZoneResolverManager : public TimeZoneResolver::Delegate {
~TimeZoneResolverManager() override;
// This sets primary_user_prefs_.
void SetPrimaryUserPrefs(PrefService* pref_service);
// TimeZoneResolver::Delegate overrides:
bool ShouldSendWiFiGeolocationData() override;
// TimeZoneResolver::Delegate overrides:
bool ShouldSendCellularGeolocationData() override;
// Starts or stops TimezoneResolver according to currect settings.
void UpdateTimezoneResolver();
// Returns true if result of timezone resolve should be applied to
// system timezone (preferences might have changed since request was started).
bool ShouldApplyResolvedTimezone();
// Returns the result of the provate call for tests.
bool TimeZoneResolverShouldBeRunningForTests();
// Returns true if TimeZoneResolver should be running and taking in account
// all configuration data.
bool TimeZoneResolverShouldBeRunning();
int GetTimezoneManagementSetting();
// This is non-null only after user logs in.
PrefService* primary_user_prefs_;
// This is used to subscribe to policy preference.
PrefChangeRegistrar local_state_pref_change_registrar_;
} // namespace system
} // namespace chromeos