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

Unified Diff: base/native_library.h

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
« no previous file with comments | « no previous file | base/native_library_ios.mm » ('j') | base/native_library_mac.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/native_library.h
diff --git a/base/native_library.h b/base/native_library.h
index 1e764da89aa6846c4d5b646a301d0d28ad9de799..5dc4802c410df10def5e4407b29f5d015e6e1a00 100644
--- a/base/native_library.h
+++ b/base/native_library.h
@@ -11,8 +11,8 @@
#include <string>
#include "base/base_export.h"
-#include "base/compiler_specific.h"
#include "base/strings/string16.h"
+#include "base/strings/string_piece.h"
#include "build/build_config.h"
#if defined(OS_WIN)
@@ -26,7 +26,7 @@ namespace base {
class FilePath;
#if defined(OS_WIN)
-typedef HMODULE NativeLibrary;
+using NativeLibrary = HMODULE;
#elif defined(OS_MACOSX)
enum NativeLibraryType {
BUNDLE,
@@ -46,9 +46,9 @@ struct NativeLibraryStruct {
void* dylib;
};
};
-typedef NativeLibraryStruct* NativeLibrary;
+using NativeLibrary = NativeLibraryStruct*;
#elif defined(OS_POSIX)
-typedef void* NativeLibrary;
+using NativeLibrary = void*;
#endif // OS_*
struct BASE_EXPORT NativeLibraryLoadError {
@@ -87,13 +87,13 @@ BASE_EXPORT void UnloadNativeLibrary(NativeLibrary library);
// Gets a function pointer from a native library.
BASE_EXPORT void* GetFunctionPointerFromNativeLibrary(NativeLibrary library,
- const char* name);
+ StringPiece name);
// Returns the full platform specific name for a native library.
// For example:
// "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux,
// "mylib.dylib" on Mac.
-BASE_EXPORT string16 GetNativeLibraryName(const string16& name);
+BASE_EXPORT string16 GetNativeLibraryName(StringPiece16 name);
} // namespace base
« no previous file with comments | « no previous file | base/native_library_ios.mm » ('j') | base/native_library_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698