OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/plugin/chrome_content_plugin_client.h" | 5 #include "chrome/plugin/chrome_content_plugin_client.h" |
6 | 6 |
7 #if defined(ENABLE_REMOTING) | 7 #if defined(ENABLE_REMOTING) |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "content/public/common/content_paths.h" | 10 #include "content/public/common/content_paths.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #if defined(ENABLE_REMOTING) | 23 #if defined(ENABLE_REMOTING) |
24 | 24 |
25 // Load crypto libraries for the Chromoting client plugin. | 25 // Load crypto libraries for the Chromoting client plugin. |
26 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS) | 26 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS) |
27 // On platforms where we use system NSS libraries, the .so's must be loaded | 27 // On platforms where we use system NSS libraries, the .so's must be loaded |
28 // before the sandbox is initialized. | 28 // before the sandbox is initialized. |
29 crypto::ForceNSSNoDBInit(); | 29 crypto::ForceNSSNoDBInit(); |
30 crypto::EnsureNSSInit(); | 30 crypto::EnsureNSSInit(); |
31 #elif defined(OS_WIN) | 31 #elif defined(OS_WIN) |
32 // crypt32.dll is used to decode X509 certificates for Chromoting. | 32 // crypt32.dll is used to decode X509 certificates for Chromoting. |
33 std::string error; | 33 base::NativeLibraryLoadError error; |
34 if (base::LoadNativeLibrary(base::FilePath(L"crypt32.dll"), &error) == NULL) | 34 if (base::LoadNativeLibrary(base::FilePath(L"crypt32.dll"), &error) == NULL) |
35 LOG(ERROR) << "Failed to load crypto32.dll: " << error; | 35 LOG(ERROR) << "Failed to load crypto32.dll: " << error.ToString(); |
36 #endif // defined(OS_WIN) | 36 #endif // defined(OS_WIN) |
37 | 37 |
38 // Load media libraries for the Chromoting client plugin. | 38 // Load media libraries for the Chromoting client plugin. |
39 base::FilePath media_path; | 39 base::FilePath media_path; |
40 PathService::Get(content::DIR_MEDIA_LIBS, &media_path); | 40 PathService::Get(content::DIR_MEDIA_LIBS, &media_path); |
41 if (!media_path.empty()) | 41 if (!media_path.empty()) |
42 media::InitializeMediaLibrary(media_path); | 42 media::InitializeMediaLibrary(media_path); |
43 | 43 |
44 #endif // defined(ENABLE_REMOTING) | 44 #endif // defined(ENABLE_REMOTING) |
45 } | 45 } |
46 | 46 |
47 } // namespace chrome | 47 } // namespace chrome |
OLD | NEW |