Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: components/download/internal/entry_utils.h

Issue 2895953004: Add initial Controller to DownloadService (Closed)
Patch Set: Rebased Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/download/internal/entry.cc ('k') | components/download/internal/entry_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_ENTRY_UTILS_H_
6 #define COMPONENTS_DOWNLOAD_INTERNAL_ENTRY_UTILS_H_
7
8 #include <map>
9 #include <set>
10 #include <string>
11 #include <vector>
12
13 #include "components/download/public/clients.h"
14
15 namespace download {
16
17 struct Entry;
18
19 namespace util {
20
21 // Helper method to return the number of Entry objects in |entries| are
22 // associated with |client|.
23 uint32_t GetNumberOfEntriesForClient(DownloadClient client,
24 const std::vector<Entry*>& entries);
25
26 // Effectively runs a map reduce to turn a list of Entry objects into a map of
27 // [Client Id] -> List of entries. Any Entry in |entries| that does not have a
28 // matching DownloadClient in |clients| will be put in the
29 // DownloadClient::INVALID bucket.
30 std::map<DownloadClient, std::vector<std::string>> MapEntriesToClients(
31 const std::set<DownloadClient>& clients,
32 const std::vector<Entry*>& entries);
33
34 } // namespace util
35 } // namespace download
36
37 #endif // COMPONENTS_DOWNLOAD_INTERNAL_ENTRY_UTILS_H_
OLDNEW
« no previous file with comments | « components/download/internal/entry.cc ('k') | components/download/internal/entry_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698