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

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

Issue 2594203004: Unifying ChildProcessLauncher across platforms. (Closed)
Patch Set: Addressed boliu@'s comments. Created 3 years, 11 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
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
index 4fc686b538e51f9ca5329ec535eb3c09ca546e02..c3756a16c3e2494d2437cffac759dfd3c502601c 100644
--- a/content/public/browser/file_descriptor_info.h
+++ b/content/public/browser/file_descriptor_info.h
@@ -7,6 +7,8 @@
#include <stddef.h>
+#include <memory>
+
#include "base/files/file.h"
#include "base/files/memory_mapped_file.h"
#include "base/process/launch.h"
@@ -21,7 +23,7 @@ namespace content {
class FileDescriptorInfo {
public:
virtual ~FileDescriptorInfo() {}
-
+#if !defined(OS_WIN)
boliu 2017/01/13 19:00:56 maybe should just compile this out of windows alto
Jay Civelli 2017/01/17 17:50:03 Yep, this is not compiled on Windows. Removed the
// Adds an FD associated with an ID, without delegating the ownerhip of ID.
virtual void Share(int id, base::PlatformFile fd) = 0;
@@ -41,8 +43,8 @@ class FileDescriptorInfo {
// A GetMapping() variant that adjusts the ID value by |delta|.
// Some environments need this trick.
- virtual base::FileHandleMappingVector GetMappingWithIDAdjustment(
- int delta) const = 0;
+ virtual std::unique_ptr<base::FileHandleMappingVector>
+ GetMappingWithIDAdjustment(int delta) const = 0;
// API for iterating over the registered ID-FD pairs.
virtual base::PlatformFile GetFDAt(size_t i) const = 0;
@@ -54,6 +56,7 @@ class FileDescriptorInfo {
virtual bool OwnsFD(base::PlatformFile file) const = 0;
// Assuming |OwnsFD(file)|, releases the ownership.
virtual base::ScopedFD ReleaseFD(base::PlatformFile file) = 0;
+#endif // !defined(OS_WIN)
};
}

Powered by Google App Engine
This is Rietveld 408576698