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

Side by Side Diff: content/public/browser/file_descriptor_info.h

Issue 909553003: Android: Get rid of extra dup()s on launching child processes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_
6 #define CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_ 6 #define CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_
7 7
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/process/launch.h" 9 #include "base/process/launch.h"
10 10
(...skipping 23 matching lines...) Expand all
34 34
35 // A GetMapping() variant what adjusts the ID value by |delta|. 35 // A GetMapping() variant what adjusts the ID value by |delta|.
36 // Some environments need this trick. 36 // Some environments need this trick.
37 virtual base::FileHandleMappingVector GetMappingWithIDAdjustment( 37 virtual base::FileHandleMappingVector GetMappingWithIDAdjustment(
38 int delta) const = 0; 38 int delta) const = 0;
39 39
40 // API for iterating registered ID-FD pairs. 40 // API for iterating registered ID-FD pairs.
41 virtual base::PlatformFile GetFDAt(size_t i) const = 0; 41 virtual base::PlatformFile GetFDAt(size_t i) const = 0;
42 virtual int GetIDAt(size_t i) const = 0; 42 virtual int GetIDAt(size_t i) const = 0;
43 virtual size_t GetMappingSize() const = 0; 43 virtual size_t GetMappingSize() const = 0;
44
45 // True if |this| has an ownership of |file|.
46 virtual bool OwnsFD(base::PlatformFile file) const = 0;
47 // Assuming |OwnsFD(file)|, release the ownership.
48 virtual base::ScopedFD ReleaseFD(base::PlatformFile file) = 0;
44 }; 49 };
45 50
46 } 51 }
47 52
48 #endif // CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_ 53 #endif // CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698