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

Unified Diff: content/public/browser/file_descriptor_info.h

Issue 10949027: Close leaking FDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed last comments and synced. Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/content_browser_client.h ('k') | content/shell/shell_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/file_descriptor_info.h
diff --git a/content/public/browser/file_descriptor_info.h b/content/public/browser/file_descriptor_info.h
new file mode 100644
index 0000000000000000000000000000000000000000..2248eb690f1b942aac9a4901f86ed6e825d65403
--- /dev/null
+++ b/content/public/browser/file_descriptor_info.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_
+#define CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_
+
+#include "base/file_descriptor_posix.h"
+
+namespace content {
+
+// This struct is used when passing files that should be mapped in a process
+// that is been created and allows to associate that file with a specific ID.
+// It also provides a way to know if the actual file descriptor should be
+// closed with the FileDescriptor.auto_close field.
+
+struct FileDescriptorInfo {
+ FileDescriptorInfo(int id, const base::FileDescriptor& file_descriptor)
+ : id(id),
+ fd(file_descriptor) {
+ }
+
+ int id;
+ base::FileDescriptor fd;
+};
+
+}
+
+#endif // CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_
« no previous file with comments | « content/public/browser/content_browser_client.h ('k') | content/shell/shell_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698