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

Unified Diff: base/native_library_posix.cc

Issue 2048523002: Fix base::GetNativeLibraryName() for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_lib_clean
Patch Set: rebase 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
« no previous file with comments | « base/native_library_mac.mm ('k') | base/native_library_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/native_library_posix.cc
diff --git a/base/native_library_posix.cc b/base/native_library_posix.cc
index 0d5ab804235fed1067ade7371495a0e1cb30d249..2dc434b7be25af2395a80b313defa3e8be08616f 100644
--- a/base/native_library_posix.cc
+++ b/base/native_library_posix.cc
@@ -8,6 +8,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
@@ -50,8 +51,9 @@ void* GetFunctionPointerFromNativeLibrary(NativeLibrary library,
}
// static
-string16 GetNativeLibraryName(StringPiece16 name) {
- return ASCIIToUTF16("lib") + name.as_string() + ASCIIToUTF16(".so");
+std::string GetNativeLibraryName(StringPiece name) {
+ DCHECK(IsStringASCII(name));
+ return "lib" + name.as_string() + ".so";
}
} // namespace base
« no previous file with comments | « base/native_library_mac.mm ('k') | base/native_library_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698