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

Unified Diff: base/native_library_win.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
« base/native_library_mac.mm ('K') | « base/native_library_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/native_library_win.cc
diff --git a/base/native_library_win.cc b/base/native_library_win.cc
index 1ca3e92f54768b5608faabdb9489631c2cc5cf08..faf0bdba4be5fa3bbc74d4b960f6ea0adee4e7a9 100644
--- a/base/native_library_win.cc
+++ b/base/native_library_win.cc
@@ -62,8 +62,7 @@ NativeLibrary LoadNativeLibrary(const FilePath& library_path,
NativeLibrary LoadNativeLibraryDynamically(const FilePath& library_path) {
typedef HMODULE (WINAPI* LoadLibraryFunction)(const wchar_t* file_name);
- LoadLibraryFunction load_library;
- load_library = reinterpret_cast<LoadLibraryFunction>(
+ LoadLibraryFunction load_library = reinterpret_cast<LoadLibraryFunction>(
GetProcAddress(GetModuleHandle(L"kernel32.dll"), "LoadLibraryW"));
return LoadNativeLibraryHelper(library_path, load_library, NULL);
@@ -76,13 +75,13 @@ void UnloadNativeLibrary(NativeLibrary library) {
// static
void* GetFunctionPointerFromNativeLibrary(NativeLibrary library,
- const char* name) {
- return GetProcAddress(library, name);
+ StringPiece name) {
+ return GetProcAddress(library, name.data());
}
// static
-string16 GetNativeLibraryName(const string16& name) {
- return name + ASCIIToUTF16(".dll");
+string16 GetNativeLibraryName(StringPiece16 name) {
+ return name.as_string() + ASCIIToUTF16(".dll");
}
} // namespace base
« base/native_library_mac.mm ('K') | « base/native_library_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698