| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #include "base/native_library.h" | 5 #include "base/native_library.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 | 10 |
| 11 namespace base { | 11 namespace base { |
| 12 | 12 |
| 13 std::string NativeLibraryLoadError::ToString() const { | 13 std::string NativeLibraryLoadError::ToString() const { |
| 14 return message; | 14 return message; |
| 15 } | 15 } |
| 16 | 16 |
| 17 // static | 17 // static |
| 18 NativeLibrary LoadNativeLibrary(const base::FilePath& library_path, | 18 NativeLibrary LoadNativeLibraryWithOptions(const base::FilePath& library_path, |
| 19 NativeLibraryLoadError* error) { | 19 const NativeLibraryOptions& options, |
| 20 NativeLibraryLoadError* error) { |
| 20 NOTIMPLEMENTED(); | 21 NOTIMPLEMENTED(); |
| 21 if (error) | 22 if (error) |
| 22 error->message = "Not implemented."; | 23 error->message = "Not implemented."; |
| 23 return nullptr; | 24 return nullptr; |
| 24 } | 25 } |
| 25 | 26 |
| 26 // static | 27 // static |
| 27 void UnloadNativeLibrary(NativeLibrary library) { | 28 void UnloadNativeLibrary(NativeLibrary library) { |
| 28 NOTIMPLEMENTED(); | 29 NOTIMPLEMENTED(); |
| 29 DCHECK(!library); | 30 DCHECK(!library); |
| 30 } | 31 } |
| 31 | 32 |
| 32 // static | 33 // static |
| 33 void* GetFunctionPointerFromNativeLibrary(NativeLibrary library, | 34 void* GetFunctionPointerFromNativeLibrary(NativeLibrary library, |
| 34 StringPiece name) { | 35 StringPiece name) { |
| 35 NOTIMPLEMENTED(); | 36 NOTIMPLEMENTED(); |
| 36 return nullptr; | 37 return nullptr; |
| 37 } | 38 } |
| 38 | 39 |
| 39 // static | 40 // static |
| 40 std::string GetNativeLibraryName(StringPiece name) { | 41 std::string GetNativeLibraryName(StringPiece name) { |
| 41 DCHECK(IsStringASCII(name)); | 42 DCHECK(IsStringASCII(name)); |
| 42 return name.as_string(); | 43 return name.as_string(); |
| 43 } | 44 } |
| 44 | 45 |
| 45 } // namespace base | 46 } // namespace base |
| OLD | NEW |