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

Unified Diff: base/posix/global_descriptors.h

Issue 2684433003: Files required by a service now listed in manifest. (Closed)
Patch Set: Removed unused method in apk_assets Created 3 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 side-by-side diff with in-line comments
Download patch
Index: base/posix/global_descriptors.h
diff --git a/base/posix/global_descriptors.h b/base/posix/global_descriptors.h
index 30db2b7ab729cb7838aff873e0982345f1b8736f..58f528559bf192ed1303285b75f0378a0fa5adc6 100644
--- a/base/posix/global_descriptors.h
+++ b/base/posix/global_descriptors.h
@@ -13,6 +13,7 @@
#include <stdint.h>
#include "base/files/memory_mapped_file.h"
+#include "base/files/scoped_file.h"
#include "base/memory/singleton.h"
namespace base {
@@ -63,6 +64,11 @@ class BASE_EXPORT GlobalDescriptors {
// Get a descriptor given a key. Returns -1 on error.
int MaybeGet(Key key) const;
+ // Returns a descriptor given a key and removes it from this class mappings.
+ // Also populates |region| if it's not null.
dcheng 2017/02/15 08:05:27 I might be missing something, but it seems like no
Jay Civelli 2017/02/15 19:53:47 Done.
+ // It is a fatal error if the key is not known.
+ base::ScopedFD TakeFD(Key key, base::MemoryMappedFile::Region* region);
+
// Get a region given a key. It is a fatal error if the key is not known.
base::MemoryMappedFile::Region GetRegion(Key key) const;

Powered by Google App Engine
This is Rietveld 408576698