#include "components/policy/core/browser/browser_policy_connector.h"
#include <stddef.h>
#include <algorithm>
#include <memory>
#include <string>
#include <string_view>
#include <utility>
#include "base/check_is_test.h"
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/strings/strcat.h"
#include "base/task/single_thread_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h"
#include "components/policy/core/common/cloud/device_management_service.h"
#include "components/policy/core/common/configuration_policy_provider.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/policy/core/common/policy_statistics_collector.h"
#include "components/policy/core/common/policy_switches.h"
#include "components/policy/policy_constants.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/signin/public/identity_manager/account_managed_status_finder.h"
namespace policy {
namespace {
const char kDefaultDeviceManagementServerUrl[] = …;
const char kDefaultEncryptedReportingServerUrl[] = …;
const char kDefaultRealtimeReportingServerUrl[] = …;
const char kFileStorageServerUploadUrlSuffixForDMServer[] = …;
}
BrowserPolicyConnector::BrowserPolicyConnector(
const HandlerListFactory& handler_list_factory)
: … { … }
BrowserPolicyConnector::~BrowserPolicyConnector() = default;
void BrowserPolicyConnector::InitInternal(
PrefService* local_state,
std::unique_ptr<DeviceManagementService> device_management_service) { … }
void BrowserPolicyConnector::Shutdown() { … }
void BrowserPolicyConnector::ScheduleServiceInitialization(
int64_t delay_milliseconds) { … }
bool BrowserPolicyConnector::ProviderHasPolicies(
const ConfigurationPolicyProvider* provider) const { … }
std::string BrowserPolicyConnector::GetDeviceManagementUrl() const { … }
std::string BrowserPolicyConnector::GetRealtimeReportingUrl() const { … }
std::string BrowserPolicyConnector::GetEncryptedReportingUrl() const { … }
std::string BrowserPolicyConnector::GetFileStorageServerUploadUrl() const { … }
std::string BrowserPolicyConnector::GetUrlOverride(
const char* flag,
std::string_view default_value) const { … }
void BrowserPolicyConnector::RegisterPrefs(PrefRegistrySimple* registry) { … }
}