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

Side by Side Diff: base/native_library.h

Issue 2048523002: Fix base::GetNativeLibraryName() for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_lib_clean
Patch Set: Remove string16 version of GetNativeLibraryName 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/native_library_ios.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_NATIVE_LIBRARY_H_ 5 #ifndef BASE_NATIVE_LIBRARY_H_
6 #define BASE_NATIVE_LIBRARY_H_ 6 #define BASE_NATIVE_LIBRARY_H_
7 7
8 // This file defines a cross-platform "NativeLibrary" type which represents 8 // This file defines a cross-platform "NativeLibrary" type which represents
9 // a loadable module. 9 // a loadable module.
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/base_export.h" 13 #include "base/base_export.h"
14 #include "base/strings/string16.h"
15 #include "base/strings/string_piece.h" 14 #include "base/strings/string_piece.h"
16 #include "build/build_config.h" 15 #include "build/build_config.h"
17 16
18 #if defined(OS_WIN) 17 #if defined(OS_WIN)
19 #include <windows.h> 18 #include <windows.h>
20 #elif defined(OS_MACOSX) 19 #elif defined(OS_MACOSX)
21 #import <CoreFoundation/CoreFoundation.h> 20 #import <CoreFoundation/CoreFoundation.h>
22 #endif // OS_* 21 #endif // OS_*
23 22
24 namespace base { 23 namespace base {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // Unloads a native library. 84 // Unloads a native library.
86 BASE_EXPORT void UnloadNativeLibrary(NativeLibrary library); 85 BASE_EXPORT void UnloadNativeLibrary(NativeLibrary library);
87 86
88 // Gets a function pointer from a native library. 87 // Gets a function pointer from a native library.
89 BASE_EXPORT void* GetFunctionPointerFromNativeLibrary(NativeLibrary library, 88 BASE_EXPORT void* GetFunctionPointerFromNativeLibrary(NativeLibrary library,
90 StringPiece name); 89 StringPiece name);
91 90
92 // Returns the full platform specific name for a native library. 91 // Returns the full platform specific name for a native library.
93 // For example: 92 // For example:
94 // "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux, 93 // "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux,
95 // "mylib.dylib" on Mac. 94 // "mylib.dylib" on Mac.
xhwang 2016/06/07 16:24:41 This comment needs to be updated.
Lei Zhang 2016/06/10 22:09:29 Done.
96 BASE_EXPORT string16 GetNativeLibraryName(StringPiece16 name); 95 BASE_EXPORT std::string GetNativeLibraryName(StringPiece name);
xhwang 2016/06/07 16:24:41 Don't we need to support UTF16 paths? Or since thi
Lei Zhang 2016/06/10 22:09:29 The callers can convert to UTF-16 if they need to.
xhwang 2016/06/10 23:27:26 But the return value is std::string now, if the or
97 96
98 } // namespace base 97 } // namespace base
99 98
100 #endif // BASE_NATIVE_LIBRARY_H_ 99 #endif // BASE_NATIVE_LIBRARY_H_
OLDNEW
« no previous file with comments | « no previous file | base/native_library_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698