| 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 "webkit/plugins/npapi/plugin_list.h" | 5 #include "webkit/plugins/npapi/plugin_list.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 false, // not recursive | 209 false, // not recursive |
| 210 file_util::FileEnumerator::FILES); | 210 file_util::FileEnumerator::FILES); |
| 211 for (base::FilePath path = enumerator.Next(); !path.value().empty(); | 211 for (base::FilePath path = enumerator.Next(); !path.value().empty(); |
| 212 path = enumerator.Next()) { | 212 path = enumerator.Next()) { |
| 213 // Skip over Mozilla .xpt files. | 213 // Skip over Mozilla .xpt files. |
| 214 if (path.MatchesExtension(FILE_PATH_LITERAL(".xpt"))) | 214 if (path.MatchesExtension(FILE_PATH_LITERAL(".xpt"))) |
| 215 continue; | 215 continue; |
| 216 | 216 |
| 217 // Java doesn't like being loaded through a symlink, since it uses | 217 // Java doesn't like being loaded through a symlink, since it uses |
| 218 // its path to find dependent data files. | 218 // its path to find dependent data files. |
| 219 // file_util::AbsolutePath calls through to realpath(), which resolves | 219 // MakeAbsoluteFilePath calls through to realpath(), which resolves |
| 220 // symlinks. | 220 // symlinks. |
| 221 base::FilePath orig_path = path; | 221 base::FilePath orig_path = base::MakeAbsoluteFilePath(path); |
| 222 file_util::AbsolutePath(&path); | |
| 223 LOG_IF(ERROR, PluginList::DebugPluginLoading()) | 222 LOG_IF(ERROR, PluginList::DebugPluginLoading()) |
| 224 << "Resolved " << orig_path.value() << " -> " << path.value(); | 223 << "Resolved " << orig_path.value() << " -> " << path.value(); |
| 225 | 224 |
| 226 if (std::find(plugins->begin(), plugins->end(), path) != plugins->end()) { | 225 if (std::find(plugins->begin(), plugins->end(), path) != plugins->end()) { |
| 227 LOG_IF(ERROR, PluginList::DebugPluginLoading()) | 226 LOG_IF(ERROR, PluginList::DebugPluginLoading()) |
| 228 << "Skipping duplicate instance of " << path.value(); | 227 << "Skipping duplicate instance of " << path.value(); |
| 229 continue; | 228 continue; |
| 230 } | 229 } |
| 231 | 230 |
| 232 if (IsBlacklistedPlugin(path)) { | 231 if (IsBlacklistedPlugin(path)) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 293 |
| 295 // TODO(evanm): prefer the newest version of flash, etc. here? | 294 // TODO(evanm): prefer the newest version of flash, etc. here? |
| 296 | 295 |
| 297 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); | 296 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); |
| 298 | 297 |
| 299 return true; | 298 return true; |
| 300 } | 299 } |
| 301 | 300 |
| 302 } // namespace npapi | 301 } // namespace npapi |
| 303 } // namespace webkit | 302 } // namespace webkit |
| OLD | NEW |