#include "extensions/browser/updater/manifest_fetch_data.h"
#include <iterator>
#include <vector>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
#include "base/strings/escape.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "extensions/browser/disable_reason.h"
#include "extensions/common/extension_id.h"
ManifestLocation;
namespace extensions {
namespace {
const int kExtensionsManifestMaxURLSize = …;
const char kInternalLocation[] = …;
const char kExternalLocation[] = …;
const char kPolicyLocation[] = …;
const char kOtherLocation[] = …;
const char kInvalidLocation[] = …;
void AddEnabledStateToPing(std::string* ping_value,
const DownloadPingData* ping_data) { … }
}
ManifestFetchData::ExtensionData::ExtensionData() : … { … }
ManifestFetchData::ExtensionData::ExtensionData(const ExtensionData& other) =
default;
ManifestFetchData::ExtensionData::ExtensionData(
const base::Version& version,
const std::string& update_url_data,
const std::string& install_source,
ManifestLocation extension_location)
: … { … }
ManifestFetchData::ExtensionData::~ExtensionData() = default;
std::string ManifestFetchData::GetSimpleLocationString(ManifestLocation loc) { … }
ManifestFetchData::ManifestFetchData(const GURL& update_url,
int request_id,
const std::string& brand_code,
const std::string& base_query_params,
PingMode ping_mode,
DownloadFetchPriority fetch_priority)
: … { … }
ManifestFetchData::~ManifestFetchData() = default;
bool ManifestFetchData::AddExtension(const std::string& id,
const std::string& version,
const DownloadPingData* ping_data,
const std::string& update_url_data,
const std::string& install_source,
ManifestLocation extension_location,
DownloadFetchPriority fetch_priority) { … }
void ManifestFetchData::AddAssociatedTask(ExtensionDownloaderTask task) { … }
void ManifestFetchData::UpdateFullUrl(const std::string& base_query_params) { … }
void ManifestFetchData::RemoveExtensions(const ExtensionIdSet& id_to_remove,
const std::string& base_query_params) { … }
ExtensionIdSet ManifestFetchData::GetExtensionIds() const { … }
bool ManifestFetchData::Includes(const ExtensionId& extension_id) const { … }
bool ManifestFetchData::DidPing(const ExtensionId& extension_id,
PingType type) const { … }
void ManifestFetchData::Merge(std::unique_ptr<ManifestFetchData> other) { … }
void ManifestFetchData::set_is_all_external_policy_download() { … }
std::vector<ExtensionDownloaderTask> ManifestFetchData::TakeAssociatedTasks() { … }
}