Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <tchar.h> | 5 #include <tchar.h> |
| 6 | 6 |
| 7 #include "webkit/glue/plugins/plugin_list.h" | 7 #include "webkit/glue/plugins/plugin_list.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 GetFirefoxInstalledPaths(&paths); | 114 GetFirefoxInstalledPaths(&paths); |
| 115 for (unsigned int i = 0; i < paths.size(); ++i) { | 115 for (unsigned int i = 0; i < paths.size(); ++i) { |
| 116 plugin_dirs->insert(paths[i].Append(L"plugins")); | 116 plugin_dirs->insert(paths[i].Append(L"plugins")); |
| 117 } | 117 } |
| 118 | 118 |
| 119 GetPluginsInRegistryDirectory( | 119 GetPluginsInRegistryDirectory( |
| 120 HKEY_CURRENT_USER, kRegistryMozillaPlugins, plugin_dirs); | 120 HKEY_CURRENT_USER, kRegistryMozillaPlugins, plugin_dirs); |
| 121 GetPluginsInRegistryDirectory( | 121 GetPluginsInRegistryDirectory( |
| 122 HKEY_LOCAL_MACHINE, kRegistryMozillaPlugins, plugin_dirs); | 122 HKEY_LOCAL_MACHINE, kRegistryMozillaPlugins, plugin_dirs); |
| 123 | 123 |
| 124 std::wstring firefox_app_data_plugin_path; | 124 FilePath firefox_app_data_plugin_path; |
| 125 if (PathService::Get(base::DIR_APP_DATA, &firefox_app_data_plugin_path)) { | 125 if (PathService::Get(base::DIR_APP_DATA, &firefox_app_data_plugin_path)) { |
| 126 firefox_app_data_plugin_path += L"\\Mozilla\\plugins"; | 126 firefox_app_data_plugin_path = |
| 127 plugin_dirs->insert(FilePath(firefox_app_data_plugin_path)); | 127 firefox_app_data_plugin_path.AppendASCII("Mozilla/plugins"); |
|
tony
2009/10/19 22:46:49
Is it safe to embed the '/' here or do you need to
Evan Stade
2009/10/19 22:54:31
<bikeshedding>
I agree AppendASCII twice is proba
| |
| 128 plugin_dirs->insert(firefox_app_data_plugin_path); | |
| 128 } | 129 } |
| 129 } | 130 } |
| 130 | 131 |
| 131 // Hardcoded logic to detect Acrobat plugins locations. | 132 // Hardcoded logic to detect Acrobat plugins locations. |
| 132 void GetAcrobatDirectory(std::set<FilePath>* plugin_dirs) { | 133 void GetAcrobatDirectory(std::set<FilePath>* plugin_dirs) { |
| 133 FilePath path; | 134 FilePath path; |
| 134 if (!GetInstalledPath(kRegistryAcrobatReader, &path) && | 135 if (!GetInstalledPath(kRegistryAcrobatReader, &path) && |
| 135 !GetInstalledPath(kRegistryAcrobat, &path)) { | 136 !GetInstalledPath(kRegistryAcrobat, &path)) { |
| 136 return; | 137 return; |
| 137 } | 138 } |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 332 for (size_t i = 0; i < plugins->size(); ++i) { | 333 for (size_t i = 0; i < plugins->size(); ++i) { |
| 333 if ((*plugins)[i].path.BaseName().value() == kNewWMPPlugin) | 334 if ((*plugins)[i].path.BaseName().value() == kNewWMPPlugin) |
| 334 return false; | 335 return false; |
| 335 } | 336 } |
| 336 } | 337 } |
| 337 | 338 |
| 338 return true; | 339 return true; |
| 339 } | 340 } |
| 340 | 341 |
| 341 } // namespace NPAPI | 342 } // namespace NPAPI |
| OLD | NEW |