| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_DOWNLOAD_INTERNAL_CLIENT_SET_H_ |
| 6 #define COMPONENTS_DOWNLOAD_INTERNAL_CLIENT_SET_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <memory> |
| 10 #include <set> |
| 11 |
| 12 #include "base/macros.h" |
| 13 #include "components/download/public/clients.h" |
| 14 |
| 15 namespace download { |
| 16 |
| 17 // Helper class to hold a list of Clients and associates them with their |
| 18 // respective DownloadClient identifier. |
| 19 class ClientSet { |
| 20 public: |
| 21 explicit ClientSet(std::unique_ptr<DownloadClientMap> clients); |
| 22 virtual ~ClientSet(); |
| 23 |
| 24 std::set<DownloadClient> GetRegisteredClients() const; |
| 25 Client* GetClient(DownloadClient id) const; |
| 26 |
| 27 private: |
| 28 std::unique_ptr<DownloadClientMap> clients_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(ClientSet); |
| 31 }; |
| 32 |
| 33 } // namespace download |
| 34 |
| 35 #endif // COMPONENTS_DOWNLOAD_INTERNAL_CLIENT_SET_H_ |
| OLD | NEW |