chromium/components/policy/core/common/cloud/reporting_job_configuration_base.cc

// Copyright 2020 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/policy/core/common/cloud/reporting_job_configuration_base.h"

#include <memory>
#include <optional>
#include <string>
#include <utility>

#include "base/functional/callback.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/metrics/histogram_functions.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "components/policy/core/common/cloud/cloud_policy_util.h"
#include "components/policy/core/common/cloud/device_management_service.h"
#include "components/policy/core/common/cloud/dm_auth.h"
#include "components/version_info/version_info.h"
#include "google_apis/google_api_keys.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "url/gurl.h"

namespace policy {

// Strings for |DeviceDictionaryBuilder|.
const char
    ReportingJobConfigurationBase::DeviceDictionaryBuilder::kDeviceKey[] =;
const char ReportingJobConfigurationBase::DeviceDictionaryBuilder::kDMToken[] =;
const char ReportingJobConfigurationBase::DeviceDictionaryBuilder::kClientId[] =;
const char
    ReportingJobConfigurationBase::DeviceDictionaryBuilder::kOSVersion[] =;
const char
    ReportingJobConfigurationBase::DeviceDictionaryBuilder::kOSPlatform[] =;
const char ReportingJobConfigurationBase::DeviceDictionaryBuilder::kName[] =;

// static
base::Value::Dict
ReportingJobConfigurationBase::DeviceDictionaryBuilder::BuildDeviceDictionary(
    const std::string& dm_token,
    const std::string& client_id) {}

// static
std::string
ReportingJobConfigurationBase::DeviceDictionaryBuilder::GetDMTokenPath() {}

// static
std::string
ReportingJobConfigurationBase::DeviceDictionaryBuilder::GetClientIdPath() {}

// static
std::string
ReportingJobConfigurationBase::DeviceDictionaryBuilder::GetOSVersionPath() {}

// static
std::string
ReportingJobConfigurationBase::DeviceDictionaryBuilder::GetOSPlatformPath() {}

// static
std::string
ReportingJobConfigurationBase::DeviceDictionaryBuilder::GetNamePath() {}

// static
std::string
ReportingJobConfigurationBase::DeviceDictionaryBuilder::GetStringPath(
    std::string_view leaf_name) {}

// Strings for |BrowserDictionaryBuilder|.
const char
    ReportingJobConfigurationBase::BrowserDictionaryBuilder::kBrowserKey[] =;
const char
    ReportingJobConfigurationBase::BrowserDictionaryBuilder::kBrowserId[] =;
const char
    ReportingJobConfigurationBase::BrowserDictionaryBuilder::kUserAgent[] =;
const char
    ReportingJobConfigurationBase::BrowserDictionaryBuilder::kMachineUser[] =;
const char
    ReportingJobConfigurationBase::BrowserDictionaryBuilder::kChromeVersion[] =;

// static
base::Value::Dict
ReportingJobConfigurationBase::BrowserDictionaryBuilder::BuildBrowserDictionary(
    bool include_device_info) {}

// static
std::string
ReportingJobConfigurationBase::BrowserDictionaryBuilder::GetBrowserIdPath() {}

// static
std::string
ReportingJobConfigurationBase::BrowserDictionaryBuilder::GetUserAgentPath() {}

// static
std::string
ReportingJobConfigurationBase::BrowserDictionaryBuilder::GetMachineUserPath() {}

// static
std::string ReportingJobConfigurationBase::BrowserDictionaryBuilder::
    GetChromeVersionPath() {}

// static
std::string
ReportingJobConfigurationBase::BrowserDictionaryBuilder::GetStringPath(
    std::string_view leaf_name) {}

std::string ReportingJobConfigurationBase::GetPayload() {}

std::string ReportingJobConfigurationBase::GetUmaName() {}

DeviceManagementService::Job::RetryMethod
ReportingJobConfigurationBase::ShouldRetry(int response_code,
                                           const std::string& response_body) {}

void ReportingJobConfigurationBase::OnBeforeRetry(
    int response_code,
    const std::string& response_body) {}

void ReportingJobConfigurationBase::OnURLLoadComplete(
    DeviceManagementService::Job* job,
    int net_error,
    int response_code,
    const std::string& response_body) {}

DeviceManagementService::Job::RetryMethod
ReportingJobConfigurationBase::ShouldRetryInternal(
    int response_code,
    const std::string& response_body) {}

void ReportingJobConfigurationBase::OnBeforeRetryInternal(
    int response_code,
    const std::string& response_body) {}

void ReportingJobConfigurationBase::UpdatePayloadBeforeGetInternal() {}

GURL ReportingJobConfigurationBase::GetURL(int last_error) const {}

ReportingJobConfigurationBase::ReportingJobConfigurationBase(
    JobType type,
    scoped_refptr<network::SharedURLLoaderFactory> factory,
    DMAuth auth_data,
    const std::string& server_url,
    UploadCompleteCallback callback)
    :{}

ReportingJobConfigurationBase::~ReportingJobConfigurationBase() = default;

void ReportingJobConfigurationBase::InitializePayloadWithDeviceInfo(
    const std::string& dm_token,
    const std::string& client_id) {}

void ReportingJobConfigurationBase::InitializePayloadWithoutDeviceInfo() {}

void ReportingJobConfigurationBase::InitializePayload(
    bool include_device_info) {}

}  // namespace policy