| 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" |
| 10 |
| 9 namespace base { | 11 namespace base { |
| 10 | 12 |
| 11 std::string NativeLibraryLoadError::ToString() const { | 13 std::string NativeLibraryLoadError::ToString() const { |
| 12 return message; | 14 return message; |
| 13 } | 15 } |
| 14 | 16 |
| 15 // static | 17 // static |
| 16 NativeLibrary LoadNativeLibrary(const base::FilePath& library_path, | 18 NativeLibrary LoadNativeLibrary(const base::FilePath& library_path, |
| 17 NativeLibraryLoadError* error) { | 19 NativeLibraryLoadError* error) { |
| 18 NOTIMPLEMENTED(); | 20 NOTIMPLEMENTED(); |
| 19 if (error) | 21 if (error) |
| 20 error->message = "Not implemented."; | 22 error->message = "Not implemented."; |
| 21 return nullptr; | 23 return nullptr; |
| 22 } | 24 } |
| 23 | 25 |
| 24 // static | 26 // static |
| 25 void UnloadNativeLibrary(NativeLibrary library) { | 27 void UnloadNativeLibrary(NativeLibrary library) { |
| 26 NOTIMPLEMENTED(); | 28 NOTIMPLEMENTED(); |
| 27 DCHECK(!library); | 29 DCHECK(!library); |
| 28 } | 30 } |
| 29 | 31 |
| 30 // static | 32 // static |
| 31 void* GetFunctionPointerFromNativeLibrary(NativeLibrary library, | 33 void* GetFunctionPointerFromNativeLibrary(NativeLibrary library, |
| 32 StringPiece name) { | 34 StringPiece name) { |
| 33 NOTIMPLEMENTED(); | 35 NOTIMPLEMENTED(); |
| 34 return nullptr; | 36 return nullptr; |
| 35 } | 37 } |
| 36 | 38 |
| 37 // static | 39 // static |
| 38 string16 GetNativeLibraryName(StringPiece16 name) { | 40 std::string GetNativeLibraryName(StringPiece name) { |
| 41 DCHECK(IsStringASCII(name)); |
| 39 return name.as_string(); | 42 return name.as_string(); |
| 40 } | 43 } |
| 41 | 44 |
| 42 } // namespace base | 45 } // namespace base |
| OLD | NEW |