| Index: components/download/internal/client_set.h
|
| diff --git a/components/download/internal/client_set.h b/components/download/internal/client_set.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2daa5206782f6dc631f99dbee4c461452d5de742
|
| --- /dev/null
|
| +++ b/components/download/internal/client_set.h
|
| @@ -0,0 +1,35 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_DOWNLOAD_INTERNAL_CLIENT_SET_H_
|
| +#define COMPONENTS_DOWNLOAD_INTERNAL_CLIENT_SET_H_
|
| +
|
| +#include <map>
|
| +#include <memory>
|
| +#include <set>
|
| +
|
| +#include "base/macros.h"
|
| +#include "components/download/public/clients.h"
|
| +
|
| +namespace download {
|
| +
|
| +// Helper class to hold a list of Clients and associates them with their
|
| +// respective DownloadClient identifier.
|
| +class ClientSet {
|
| + public:
|
| + explicit ClientSet(std::unique_ptr<DownloadClientMap> clients);
|
| + virtual ~ClientSet();
|
| +
|
| + std::set<DownloadClient> GetRegisteredClients() const;
|
| + Client* GetClient(DownloadClient id) const;
|
| +
|
| + private:
|
| + std::unique_ptr<DownloadClientMap> clients_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ClientSet);
|
| +};
|
| +
|
| +} // namespace download
|
| +
|
| +#endif // COMPONENTS_DOWNLOAD_INTERNAL_CLIENT_SET_H_
|
|
|