OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/cros/cros_library_loader.h" |
| 6 |
| 7 #include <dlfcn.h> |
| 8 |
| 9 #include "base/file_path.h" |
| 10 #include "base/logging.h" |
| 11 #include "base/path_service.h" |
| 12 #include "chrome/common/chrome_paths.h" |
| 13 #include "third_party/cros/chromeos_cros_api.h" |
| 14 |
| 15 namespace chromeos { |
| 16 |
| 17 bool CrosLibraryLoader::Load(std::string* load_error_string) { |
| 18 bool loaded = false; |
| 19 FilePath path; |
| 20 if (PathService::Get(chrome::FILE_CHROMEOS_API, &path)) |
| 21 loaded = LoadLibcros(path.value().c_str(), *load_error_string); |
| 22 |
| 23 if (!loaded) { |
| 24 LOG(ERROR) << "Problem loading chromeos shared object: " |
| 25 << *load_error_string; |
| 26 } |
| 27 return loaded; |
| 28 } |
| 29 |
| 30 } // namespace chromeos |
| 31 |
OLD | NEW |