| Index: base/native_library_posix.cc
|
| diff --git a/base/native_library_posix.cc b/base/native_library_posix.cc
|
| index dfa20fc01cf78ef6ab2061f3eefb32d3c8f324c0..256a651edd6cce9b1cb63983fa304521a974472f 100644
|
| --- a/base/native_library_posix.cc
|
| +++ b/base/native_library_posix.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "base/native_library.h"
|
|
|
| +#include <ostream>
|
| +
|
| #include <dlfcn.h>
|
|
|
| #include "base/files/file_path.h"
|
| @@ -15,7 +17,7 @@ namespace base {
|
|
|
| // static
|
| NativeLibrary LoadNativeLibrary(const FilePath& library_path,
|
| - std::string* error) {
|
| + NativeLibraryLoadError* error) {
|
| // dlopen() opens the file off disk.
|
| base::ThreadRestrictions::AssertIOAllowed();
|
|
|
| @@ -25,7 +27,7 @@ NativeLibrary LoadNativeLibrary(const FilePath& library_path,
|
| // and http://crbug.com/40794.
|
| void* dl = dlopen(library_path.value().c_str(), RTLD_LAZY);
|
| if (!dl && error)
|
| - *error = dlerror();
|
| + error->message = dlerror();
|
|
|
| return dl;
|
| }
|
| @@ -50,4 +52,10 @@ string16 GetNativeLibraryName(const string16& name) {
|
| return ASCIIToUTF16("lib") + name + ASCIIToUTF16(".so");
|
| }
|
|
|
| +// static
|
| +std::ostream& operator<<(std::ostream& out,
|
| + const NativeLibraryLoadError& error) {
|
| + return out << error.message;
|
| +}
|
| +
|
| } // namespace base
|
|
|