Save errno for logging before potentially overwriting it.
[chromium-blink-merge.git] / content / public / browser / file_descriptor_info.h
blob2248eb690f1b942aac9a4901f86ed6e825d65403
1 // Copyright (c) 2012 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.
5 #ifndef CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_
6 #define CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_
8 #include "base/file_descriptor_posix.h"
10 namespace content {
12 // This struct is used when passing files that should be mapped in a process
13 // that is been created and allows to associate that file with a specific ID.
14 // It also provides a way to know if the actual file descriptor should be
15 // closed with the FileDescriptor.auto_close field.
17 struct FileDescriptorInfo {
18 FileDescriptorInfo(int id, const base::FileDescriptor& file_descriptor)
19 : id(id),
20 fd(file_descriptor) {
23 int id;
24 base::FileDescriptor fd;
29 #endif // CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_