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

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

Issue 214018: Look for the WMP plugin in the directory that it's left in if Firefox isn't i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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_win.cc
===================================================================
--- webkit/glue/plugins/plugin_list_win.cc (revision 26521)
+++ webkit/glue/plugins/plugin_list_win.cc (working copy)
@@ -8,8 +8,10 @@
#include "base/basictypes.h"
#include "base/command_line.h"
+#include "base/file_util.h"
#include "base/path_service.h"
#include "base/registry.h"
+#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "webkit/glue/plugins/plugin_constants_win.h"
#include "webkit/glue/plugins/plugin_lib.h"
@@ -149,6 +151,26 @@
FilePath path;
if (GetInstalledPath(kRegistryWindowsMedia, &path))
plugin_dirs->insert(path);
+
+ // If the Windows Media Player Firefox plugin is installed before Firefox,
+ // the plugin will get written under PFiles\Plugins on one the drives
+ // (usually, but not always, the last letter).
+ int size = GetLogicalDriveStrings(0, NULL);
+ if (size) {
+ scoped_array<wchar_t> strings(new wchar_t[size]);
+ if (GetLogicalDriveStrings(size, strings.get())) {
+ wchar_t *next_drive = strings.get();
ananta 2009/09/18 17:43:57 wchar_t* ?
+ while (*next_drive) {
+ if (GetDriveType(next_drive) == DRIVE_FIXED) {
+ FilePath pfiles(next_drive);
+ pfiles = pfiles.Append(L"PFiles\\Plugins");
+ if (file_util::PathExists(pfiles))
+ plugin_dirs->insert(pfiles);
+ }
+ next_drive = &next_drive[wcslen(next_drive) + 1];
+ }
+ }
+ }
}
// Hardcoded logic to detect Java plugin location.
« 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