Chromium Code Reviews| Index: base/native_library.h |
| diff --git a/base/native_library.h b/base/native_library.h |
| index b4f3a3cd1ba267000848b09c0ee9d8af7983387f..074b6a70adf343d06e3a0f8bac17f3ded2136903 100644 |
| --- a/base/native_library.h |
| +++ b/base/native_library.h |
| @@ -65,12 +65,29 @@ struct BASE_EXPORT NativeLibraryLoadError { |
| #endif // OS_WIN |
| }; |
| +struct BASE_EXPORT NativeLibraryOptions { |
|
Primiano Tucci (use gerrit)
2016/08/24 22:14:09
If there are no other use cases this IMHO should b
Ken Rockot(use gerrit already)
2016/08/24 23:23:57
I'd prefer to use a struct here only because it's
Primiano Tucci (use gerrit)
2016/08/25 10:20:44
I leave this to base owners, as I'm not an owner h
|
| + NativeLibraryOptions() {} |
| + |
| + // If |true| the library will prefer its own symbols in lieu of symbols in the |
| + // global scope. This is ignored on non-POSIX platforms. On POSIX the behavior |
| + // when |true| corresponds to setting RTLD_DEEPBIND on dlopen(). |
|
Primiano Tucci (use gerrit)
2016/08/24 22:14:09
Interestingly it seems that on Mac OSX DEEPBIND is
Ken Rockot(use gerrit already)
2016/08/24 23:23:57
Added a note about this
|
| + bool prefer_own_symbols = false; |
| +}; |
| + |
| // Loads a native library from disk. Release it with UnloadNativeLibrary when |
| // you're done. Returns NULL on failure. |
| // If |error| is not NULL, it may be filled in on load error. |
| BASE_EXPORT NativeLibrary LoadNativeLibrary(const FilePath& library_path, |
| NativeLibraryLoadError* error); |
| +// Loads a native library from disk. Release it with UnloadNativeLibrary when |
| +// you're done. Returns NULL on failure. |
| +// If |error| is not NULL, it may be filled in on load error. |
| +BASE_EXPORT NativeLibrary LoadNativeLibraryWithOptions( |
| + const FilePath& library_path, |
| + const NativeLibraryOptions& options, |
| + NativeLibraryLoadError* error); |
| + |
| #if defined(OS_WIN) |
| // Loads a native library from disk. Release it with UnloadNativeLibrary when |
| // you're done. |