Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(962)

Unified Diff: webkit/glue/plugins/plugin_list_linux.cc

Issue 206009: linux: defend against "netscape" within plugin path (Closed)
Patch Set: test filename Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_list_linux.cc
diff --git a/webkit/glue/plugins/plugin_list_linux.cc b/webkit/glue/plugins/plugin_list_linux.cc
index bdc0bf83394549419ddb38acd820699050dd0486..4f72ab1444d91831b2ef0ecfd2b1d1686751ddfb 100644
--- a/webkit/glue/plugins/plugin_list_linux.cc
+++ b/webkit/glue/plugins/plugin_list_linux.cc
@@ -117,6 +117,22 @@ void PluginList::LoadPluginsFromDir(const FilePath& path,
if (DebugPluginLoading())
LOG(ERROR) << "Resolved " << orig_path.value() << " -> " << path.value();
+ // Flash stops working if the containing directory involves 'netscape'.
+ // No joke. So use the other path if it's better.
+ static const char kFlashPlayerFilename[] = "libflashplayer.so";
+ static const char kNetscapeInPath[] = "/netscape/";
+ if (path.BaseName().value() == kFlashPlayerFilename &&
+ path.value().find(kNetscapeInPath) != std::string::npos) {
+ if (orig_path.value().find(kNetscapeInPath) == std::string::npos) {
+ // Go back to the old path.
+ path = orig_path;
+ } else {
+ LOG(ERROR) << "Flash misbehaves when used from a directory containing "
+ << kNetscapeInPath << ", so skipping " << orig_path.value();
+ continue;
+ }
+ }
+
// Get mtime.
file_util::FileInfo info;
if (!file_util::GetFileInfo(path, &info))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698