jfroy | 32be1d41 | 2015-04-01 17:10:29 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "base/native_library.h" |
| 6 | |
| 7 | #include "base/logging.h" |
| 8 | |
thestig | 02c965b | 2016-06-14 18:52:23 | [diff] [blame] | 9 | #include "base/strings/string_util.h" |
| 10 | |
jfroy | 32be1d41 | 2015-04-01 17:10:29 | [diff] [blame] | 11 | namespace base { |
| 12 | |
| 13 | std::string NativeLibraryLoadError::ToString() const { |
| 14 | return message; |
| 15 | } |
| 16 | |
| 17 | // static |
rockot | 596a0dd | 2016-08-26 00:57:51 | [diff] [blame] | 18 | NativeLibrary LoadNativeLibraryWithOptions(const base::FilePath& library_path, |
| 19 | const NativeLibraryOptions& options, |
| 20 | NativeLibraryLoadError* error) { |
jfroy | 32be1d41 | 2015-04-01 17:10:29 | [diff] [blame] | 21 | NOTIMPLEMENTED(); |
xhwang | 6a01b39 | 2015-11-10 07:48:30 | [diff] [blame] | 22 | if (error) |
| 23 | error->message = "Not implemented."; |
jfroy | 32be1d41 | 2015-04-01 17:10:29 | [diff] [blame] | 24 | return nullptr; |
| 25 | } |
| 26 | |
| 27 | // static |
| 28 | void UnloadNativeLibrary(NativeLibrary library) { |
| 29 | NOTIMPLEMENTED(); |
| 30 | DCHECK(!library); |
| 31 | } |
| 32 | |
| 33 | // static |
| 34 | void* GetFunctionPointerFromNativeLibrary(NativeLibrary library, |
thestig | e38fbd6 | 2016-06-10 21:54:40 | [diff] [blame] | 35 | StringPiece name) { |
jfroy | 32be1d41 | 2015-04-01 17:10:29 | [diff] [blame] | 36 | NOTIMPLEMENTED(); |
| 37 | return nullptr; |
| 38 | } |
| 39 | |
| 40 | // static |
thestig | 02c965b | 2016-06-14 18:52:23 | [diff] [blame] | 41 | std::string GetNativeLibraryName(StringPiece name) { |
| 42 | DCHECK(IsStringASCII(name)); |
thestig | e38fbd6 | 2016-06-10 21:54:40 | [diff] [blame] | 43 | return name.as_string(); |
jfroy | 32be1d41 | 2015-04-01 17:10:29 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | } // namespace base |