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 SERVICES_SERVICE_MANAGER_PUBLIC_CPP_REQUIRED_FILE_DESCRIPTOR_H_ |
| 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_REQUIRED_FILE_DESCRIPTOR_H_ |
| 7 |
| 8 #include "base/files/file_path.h" |
| 9 #include "base/files/memory_mapped_file.h" |
| 10 |
| 11 namespace service_manager { |
| 12 |
| 13 struct RequiredFileDescriptor { |
| 14 base::FilePath path; |
| 15 |
| 16 // Region of interest in the file. |
| 17 base::MemoryMappedFile::Region region = |
| 18 base::MemoryMappedFile::Region::kWholeFile; |
| 19 |
| 20 bool IsRegionWholeFile() const { |
| 21 return region == base::MemoryMappedFile::Region::kWholeFile; |
| 22 } |
| 23 }; |
| 24 |
| 25 using RequiredFileDescriptorMap = std::map<std::string, RequiredFileDescriptor>; |
| 26 |
| 27 } // namespace service_manager |
| 28 |
| 29 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_REQUIRED_FILE_DESCRIPTOR_H_ |
OLD | NEW |