#include "chrome/browser/enterprise/reporting/cloud_profile_reporting_service.h"
#include <utility>
#include "base/check_is_test.h"
#include "base/feature_list.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/browser_management/management_service_factory.h"
#include "chrome/browser/enterprise/identifiers/profile_id_service_factory.h"
#include "chrome/browser/enterprise/util/affiliation.h"
#include "chrome/browser/policy/chrome_browser_policy_connector.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_attributes_entry.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "components/enterprise/browser/identifiers/profile_id_service.h"
#include "components/enterprise/browser/reporting/chrome_profile_request_generator.h"
#include "components/enterprise/browser/reporting/report_scheduler.h"
#include "components/policy/core/common/cloud/cloud_policy_client.h"
#include "components/policy/core/common/cloud/cloud_policy_core.h"
#include "components/policy/core/common/cloud/cloud_policy_manager.h"
#include "components/policy/core/common/policy_service.h"
#include "components/policy/policy_constants.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/buildflags/buildflags.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#if BUILDFLAG(IS_ANDROID)
#include "chrome/browser/enterprise/reporting/reporting_delegate_factory_android.h"
#else
#include "chrome/browser/enterprise/reporting/reporting_delegate_factory_desktop.h"
#endif
namespace enterprise_reporting {
namespace {
#if BUILDFLAG(ENABLE_EXTENSIONS)
BASE_FEATURE(…);
#endif
std::string GetProfileName(Profile* profile) { … }
#if BUILDFLAG(ENABLE_EXTENSIONS)
bool CanUploadExtensionInfo(Profile* profile) { … }
#endif
}
CloudProfileReportingService::CloudProfileReportingService(Profile* profile)
: … { … }
CloudProfileReportingService::~CloudProfileReportingService() = default;
void CloudProfileReportingService::CreateReportScheduler() { … }
void CloudProfileReportingService::OnCoreConnected(
policy::CloudPolicyCore* core) { … }
void CloudProfileReportingService::OnRefreshSchedulerStarted(
policy::CloudPolicyCore* core) { … }
void CloudProfileReportingService::OnCoreDisconnecting(
policy::CloudPolicyCore* core) { … }
void CloudProfileReportingService::InitForTesting() { … }
void CloudProfileReportingService::Init() { … }
}