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

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
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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_)
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 // Note: "extra" plugin dirs and paths are examined before these.
442 // "Extra" are those added by PluginList::AddExtraPluginDir() and
443 // PluginList::AddExtraPluginPath().
441 444
442 // The Chrome binary dir + "plugins/". 445 // The Chrome binary dir + "plugins/".
443 base::FilePath dir; 446 base::FilePath dir;
444 PathService::Get(base::DIR_EXE, &dir); 447 PathService::Get(base::DIR_EXE, &dir);
445 plugin_dirs->push_back(dir.Append("plugins")); 448 plugin_dirs->push_back(dir.Append("plugins"));
446 449
447 // Chrome OS only loads plugins from /opt/google/chrome/plugins. 450 // Chrome OS only loads plugins from /opt/google/chrome/plugins.
448 #if !defined(OS_CHROMEOS) 451 #if !defined(OS_CHROMEOS)
449 // Mozilla code to reference: 452 // Mozilla code to reference:
450 // http://mxr.mozilla.org/firefox/ident?i=NS_APP_PLUGINS_DIR_LIST 453 // http://mxr.mozilla.org/firefox/ident?i=NS_APP_PLUGINS_DIR_LIST
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 587
585 // TODO(evanm): prefer the newest version of flash, etc. here? 588 // TODO(evanm): prefer the newest version of flash, etc. here?
586 589
587 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); 590 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value();
588 591
589 return true; 592 return true;
590 } 593 }
591 594
592 } // namespace npapi 595 } // namespace npapi
593 } // namespace webkit 596 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698