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

Side by Side Diff: webkit/plugins/npapi/plugin_list_posix.cc

Issue 16369004: Adding --disable-plugins-discovery command line switch to not load third-party plugins from common … (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 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 unified diff | Download patch
« no previous file with comments | « webkit/plugins/npapi/plugin_list_mac.mm ('k') | webkit/plugins/npapi/plugin_list_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 info->version = UTF8ToUTF16(version); 429 info->version = UTF8ToUTF16(version);
430 } 430 }
431 } 431 }
432 432
433 void PluginList::GetPluginDirectories(std::vector<base::FilePath>* plugin_dirs) { 433 void PluginList::GetPluginDirectories(std::vector<base::FilePath>* plugin_dirs) {
434 // See http://groups.google.com/group/chromium-dev/browse_thread/thread/7a70e5 fcbac786a9 434 // See http://groups.google.com/group/chromium-dev/browse_thread/thread/7a70e5 fcbac786a9
435 // for discussion. 435 // for discussion.
436 // We first consult Chrome-specific dirs, then fall back on the logic 436 // We first consult Chrome-specific dirs, then fall back on the logic
437 // Mozilla uses. 437 // Mozilla uses.
438 438
439 // Note: "extra" plugin dirs, including the Plugins subdirectory of 439 if (PluginList::plugins_discovery_disabled_)
440 // your Chrome config, are examined before these. See the logic 440 return;
441 // related to extra_plugin_dirs in plugin_list.cc. 441
442 // Note: "extra" plugin dirs and paths are examined before these.
443 // "Extra" are those added by PluginList::AddExtraPluginDir() and
444 // PluginList::AddExtraPluginPath().
442 445
443 // The Chrome binary dir + "plugins/". 446 // The Chrome binary dir + "plugins/".
444 base::FilePath dir; 447 base::FilePath dir;
445 PathService::Get(base::DIR_EXE, &dir); 448 PathService::Get(base::DIR_EXE, &dir);
446 plugin_dirs->push_back(dir.Append("plugins")); 449 plugin_dirs->push_back(dir.Append("plugins"));
447 450
448 // Chrome OS only loads plugins from /opt/google/chrome/plugins. 451 // Chrome OS only loads plugins from /opt/google/chrome/plugins.
449 #if !defined(OS_CHROMEOS) 452 #if !defined(OS_CHROMEOS)
450 // Mozilla code to reference: 453 // Mozilla code to reference:
451 // http://mxr.mozilla.org/firefox/ident?i=NS_APP_PLUGINS_DIR_LIST 454 // http://mxr.mozilla.org/firefox/ident?i=NS_APP_PLUGINS_DIR_LIST
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 588
586 // TODO(evanm): prefer the newest version of flash, etc. here? 589 // TODO(evanm): prefer the newest version of flash, etc. here?
587 590
588 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); 591 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value();
589 592
590 return true; 593 return true;
591 } 594 }
592 595
593 } // namespace npapi 596 } // namespace npapi
594 } // namespace webkit 597 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_list_mac.mm ('k') | webkit/plugins/npapi/plugin_list_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698