Index: services/service_manager/public/cpp/required_file_descriptor.h |
diff --git a/services/service_manager/public/cpp/required_file_descriptor.h b/services/service_manager/public/cpp/required_file_descriptor.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2def4c62b9cb077b6ee6918f87cf2b57a23e00ad |
--- /dev/null |
+++ b/services/service_manager/public/cpp/required_file_descriptor.h |
@@ -0,0 +1,29 @@ |
+// 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 SERVICES_SERVICE_MANAGER_PUBLIC_CPP_REQUIRED_FILE_DESCRIPTOR_H_ |
+#define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_REQUIRED_FILE_DESCRIPTOR_H_ |
+ |
+#include "base/files/file_path.h" |
+#include "base/files/memory_mapped_file.h" |
+ |
+namespace service_manager { |
+ |
+struct RequiredFileDescriptor { |
+ base::FilePath path; |
+ |
+ // Region of interest in the file. |
+ base::MemoryMappedFile::Region region = |
+ base::MemoryMappedFile::Region::kWholeFile; |
+ |
+ bool IsRegionWholeFile() const { |
+ return region == base::MemoryMappedFile::Region::kWholeFile; |
+ } |
+}; |
+ |
+using RequiredFileDescriptorMap = std::map<std::string, RequiredFileDescriptor>; |
+ |
+} // namespace service_manager |
+ |
+#endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_REQUIRED_FILE_DESCRIPTOR_H_ |