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 #include <dlfcn.h> | 8 #include <dlfcn.h> |
9 #if defined(OS_OPENBSD) | 9 #if defined(OS_OPENBSD) |
10 #include <sys/exec_elf.h> | 10 #include <sys/exec_elf.h> |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
428 info->version = UTF8ToUTF16(version); | 428 info->version = UTF8ToUTF16(version); |
429 } | 429 } |
430 } | 430 } |
431 | 431 |
432 void PluginList::GetPluginDirectories(std::vector<base::FilePath>* plugin_dirs) { | 432 void PluginList::GetPluginDirectories(std::vector<base::FilePath>* plugin_dirs) { |
433 // See http://groups.google.com/group/chromium-dev/browse_thread/thread/7a70e5 fcbac786a9 | 433 // See http://groups.google.com/group/chromium-dev/browse_thread/thread/7a70e5 fcbac786a9 |
434 // for discussion. | 434 // for discussion. |
435 // We first consult Chrome-specific dirs, then fall back on the logic | 435 // We first consult Chrome-specific dirs, then fall back on the logic |
436 // Mozilla uses. | 436 // Mozilla uses. |
437 | 437 |
438 // Note: "extra" plugin dirs, including the Plugins subdirectory of | 438 if (PluginList::plugins_discovery_disabled_) { |
Bernhard Bauer
2013/06/06 08:28:50
Remove braces.
seva
2013/06/06 22:11:25
Done.
| |
439 // your Chrome config, are examined before these. See the logic | 439 return; |
440 // related to extra_plugin_dirs in plugin_list.cc. | 440 } |
441 | |
442 // Note: "extra" plugin dirs are examined before these. "Extra" include | |
443 // --extra-plugin-dir, --load-plugin switches, if passed, as well as Plugins | |
444 // subdirectory of your Chrome config (e.g. ~/.config/chromium/Plugins). | |
445 // See the logic related to extra_plugin_dirs in plugin_list.cc and | |
446 // AddExtraPluginDir call in chrome/browser/browser_process_impl.cc. | |
Bernhard Bauer
2013/06/06 08:28:50
I'm not sure if the comment here should refer to c
seva
2013/06/06 22:11:25
Done.
| |
441 | 447 |
442 // The Chrome binary dir + "plugins/". | 448 // The Chrome binary dir + "plugins/". |
443 base::FilePath dir; | 449 base::FilePath dir; |
444 PathService::Get(base::DIR_EXE, &dir); | 450 PathService::Get(base::DIR_EXE, &dir); |
445 plugin_dirs->push_back(dir.Append("plugins")); | 451 plugin_dirs->push_back(dir.Append("plugins")); |
446 | 452 |
447 // Chrome OS only loads plugins from /opt/google/chrome/plugins. | 453 // Chrome OS only loads plugins from /opt/google/chrome/plugins. |
448 #if !defined(OS_CHROMEOS) | 454 #if !defined(OS_CHROMEOS) |
449 // Mozilla code to reference: | 455 // Mozilla code to reference: |
450 // http://mxr.mozilla.org/firefox/ident?i=NS_APP_PLUGINS_DIR_LIST | 456 // http://mxr.mozilla.org/firefox/ident?i=NS_APP_PLUGINS_DIR_LIST |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
584 | 590 |
585 // TODO(evanm): prefer the newest version of flash, etc. here? | 591 // TODO(evanm): prefer the newest version of flash, etc. here? |
586 | 592 |
587 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); | 593 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); |
588 | 594 |
589 return true; | 595 return true; |
590 } | 596 } |
591 | 597 |
592 } // namespace npapi | 598 } // namespace npapi |
593 } // namespace webkit | 599 } // namespace webkit |
OLD | NEW |