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 "content/common/pepper_plugin_registry.h" | 5 #include "content/common/pepper_plugin_registry.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/native_library.h" | 9 #include "base/native_library.h" |
10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 // static | 131 // static |
132 void PepperPluginRegistry::PreloadModules() { | 132 void PepperPluginRegistry::PreloadModules() { |
133 std::vector<content::PepperPluginInfo> plugins; | 133 std::vector<content::PepperPluginInfo> plugins; |
134 ComputeList(&plugins); | 134 ComputeList(&plugins); |
135 for (size_t i = 0; i < plugins.size(); ++i) { | 135 for (size_t i = 0; i < plugins.size(); ++i) { |
136 if (!plugins[i].is_internal && plugins[i].is_sandboxed) { | 136 if (!plugins[i].is_internal && plugins[i].is_sandboxed) { |
137 std::string error; | 137 std::string error; |
138 base::NativeLibrary library = base::LoadNativeLibrary(plugins[i].path, | 138 base::NativeLibrary library = base::LoadNativeLibrary(plugins[i].path, |
139 &error); | 139 &error); |
| 140 #if defined(OS_CHROMEOS) |
| 141 // TODO(xiyuan): Remove this once crosbug.com/26646 is resolved. |
| 142 LOG(ERROR) << "#### PepperPluginRegistry::PreloadModules" |
| 143 << ", path=" << plugins[i].path.value(); |
| 144 #endif // defined (OS_CHROMEOS) |
140 DLOG_IF(WARNING, !library) << "Unable to load plugin " | 145 DLOG_IF(WARNING, !library) << "Unable to load plugin " |
141 << plugins[i].path.value() << " " | 146 << plugins[i].path.value() << " " |
142 << error; | 147 << error; |
143 (void)library; // Prevent release-mode warning. | 148 (void)library; // Prevent release-mode warning. |
144 } | 149 } |
145 } | 150 } |
146 } | 151 } |
147 | 152 |
148 const content::PepperPluginInfo* PepperPluginRegistry::GetInfoForPlugin( | 153 const content::PepperPluginInfo* PepperPluginRegistry::GetInfoForPlugin( |
149 const webkit::WebPluginInfo& info) { | 154 const webkit::WebPluginInfo& info) { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // Preload all external plugins we're not running out of process. | 233 // Preload all external plugins we're not running out of process. |
229 if (!module->InitAsLibrary(current.path)) { | 234 if (!module->InitAsLibrary(current.path)) { |
230 DLOG(ERROR) << "Failed to load pepper module: " << current.path.value(); | 235 DLOG(ERROR) << "Failed to load pepper module: " << current.path.value(); |
231 continue; | 236 continue; |
232 } | 237 } |
233 } | 238 } |
234 preloaded_modules_[current.path] = module; | 239 preloaded_modules_[current.path] = module; |
235 } | 240 } |
236 } | 241 } |
237 | 242 |
OLD | NEW |