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