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

Unified Diff: base/native_library_posix.cc

Issue 2042103002: Clean up some nits in base::NativeLibrary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/native_library_posix.cc
diff --git a/base/native_library_posix.cc b/base/native_library_posix.cc
index 3179a93833c0ad20beafe800d8e24d3a21d127b5..0d5ab804235fed1067ade7371495a0e1cb30d249 100644
--- a/base/native_library_posix.cc
+++ b/base/native_library_posix.cc
@@ -21,7 +21,7 @@ std::string NativeLibraryLoadError::ToString() const {
NativeLibrary LoadNativeLibrary(const FilePath& library_path,
NativeLibraryLoadError* error) {
// dlopen() opens the file off disk.
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
// We deliberately do not use RTLD_DEEPBIND. For the history why, please
// refer to the bug tracker. Some useful bug reports to read include:
@@ -45,13 +45,13 @@ void UnloadNativeLibrary(NativeLibrary library) {
// static
void* GetFunctionPointerFromNativeLibrary(NativeLibrary library,
- const char* name) {
- return dlsym(library, name);
+ StringPiece name) {
+ return dlsym(library, name.data());
}
// static
-string16 GetNativeLibraryName(const string16& name) {
- return ASCIIToUTF16("lib") + name + ASCIIToUTF16(".so");
+string16 GetNativeLibraryName(StringPiece16 name) {
+ return ASCIIToUTF16("lib") + name.as_string() + ASCIIToUTF16(".so");
}
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698