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

Side by Side Diff: services/catalog/public/cpp/resource_loader.h

Issue 1962503002: Add mojom module suffix in .mojom files for components/filesystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « services/catalog/manifest.json ('k') | services/catalog/public/cpp/resource_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_CATALOG_PUBLIC_CPP_RESOURCE_LOADER_H_ 5 #ifndef SERVICES_CATALOG_PUBLIC_CPP_RESOURCE_LOADER_H_
6 #define SERVICES_CATALOG_PUBLIC_CPP_RESOURCE_LOADER_H_ 6 #define SERVICES_CATALOG_PUBLIC_CPP_RESOURCE_LOADER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 12 matching lines...) Expand all
23 // and return the file handles. Use TakeFile() to retrieve a base::File to use 23 // and return the file handles. Use TakeFile() to retrieve a base::File to use
24 // in client code. 24 // in client code.
25 class ResourceLoader { 25 class ResourceLoader {
26 public: 26 public:
27 ResourceLoader(); 27 ResourceLoader();
28 ~ResourceLoader(); 28 ~ResourceLoader();
29 29
30 // (Synchronously) opens all of the files in |paths| for reading. Use 30 // (Synchronously) opens all of the files in |paths| for reading. Use
31 // TakeFile() subsequently to obtain base::Files to use. Returns true if the 31 // TakeFile() subsequently to obtain base::Files to use. Returns true if the
32 // sync operation completed, false if it did not. 32 // sync operation completed, false if it did not.
33 bool OpenFiles(filesystem::DirectoryPtr directory, 33 bool OpenFiles(filesystem::mojom::DirectoryPtr directory,
34 const std::set<std::string>& paths); 34 const std::set<std::string>& paths);
35 35
36 // Releases and returns the file wrapping the handle. 36 // Releases and returns the file wrapping the handle.
37 base::File TakeFile(const std::string& path); 37 base::File TakeFile(const std::string& path);
38 38
39 private: 39 private:
40 using ResourceMap = std::map<std::string, std::unique_ptr<base::File>>; 40 using ResourceMap = std::map<std::string, std::unique_ptr<base::File>>;
41 41
42 ResourceMap resource_map_; 42 ResourceMap resource_map_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); 44 DISALLOW_COPY_AND_ASSIGN(ResourceLoader);
45 }; 45 };
46 46
47 } // namespace 47 } // namespace
48 48
49 #endif // SERVICES_CATALOG_PUBLIC_CPP_RESOURCE_LOADER_H_ 49 #endif // SERVICES_CATALOG_PUBLIC_CPP_RESOURCE_LOADER_H_
OLDNEW
« no previous file with comments | « services/catalog/manifest.json ('k') | services/catalog/public/cpp/resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698