// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_DOWNLOAD_PUBLIC_BACKGROUND_SERVICE_CLIENTS_H_ #define COMPONENTS_DOWNLOAD_PUBLIC_BACKGROUND_SERVICE_CLIENTS_H_ #include <map> #include <memory> #include <string> #include "components/download/public/background_service/client.h" namespace download { // A list of all clients that are able to make download requests through the // DownloadService. // To add a new client, update the metric DownloadService.DownloadClients in // histograms.xml and make sure to keep this list in sync. Additions should be // treated as APPEND ONLY to make sure to keep both UMA metric semantics correct // but also to make sure the underlying database properly associates each // download with the right client. enum class DownloadClient { … }; // Get a string that represents a particular client. Used in histograms and // debugging web UI. Must never change existing value and sync value with // variants "DownloadClient" in histograms.xml. std::string BackgroundDownloadClientToString(DownloadClient client); DownloadClientMap; } // namespace download #endif // COMPONENTS_DOWNLOAD_PUBLIC_BACKGROUND_SERVICE_CLIENTS_H_