summaryrefslogtreecommitdiffstats
path: root/content/plugin/plugin_thread.cc
diff options
context:
space:
mode:
authorsteveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-21 19:29:02 +0000
committersteveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-21 19:29:02 +0000
commit0763592a19d173eafc3d725980d6b117927b45dc (patch)
treef941e8b692cdcb81e8405f15f3d72271477f245a /content/plugin/plugin_thread.cc
parentf020428b6ff317d7785c97468fd2173cccfa097e (diff)
downloadchromium_src-0763592a19d173eafc3d725980d6b117927b45dc.zip
chromium_src-0763592a19d173eafc3d725980d6b117927b45dc.tar.gz
chromium_src-0763592a19d173eafc3d725980d6b117927b45dc.tar.bz2
Modify NPObjectStub::OnSetProperty() to get the plugin path from the command line directly
This avoids the need for NPObjectStub to use PluginThread::plugin_path() and allows us to remove the content/plugin/ include from npobject_stub.cc. We can also remove PluginThread::plugin_path(). Refactoring only, no functional change. BUG=96703 Review URL: http://codereview.chromium.org/7982026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/plugin/plugin_thread.cc')
-rw-r--r--content/plugin/plugin_thread.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc
index 67c7cff..f7840df 100644
--- a/content/plugin/plugin_thread.cc
+++ b/content/plugin/plugin_thread.cc
@@ -69,9 +69,8 @@ static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls(
PluginThread::PluginThread()
: preloaded_plugin_module_(NULL) {
- plugin_path_ =
- CommandLine::ForCurrentProcess()->GetSwitchValuePath(
- switches::kPluginPath);
+ FilePath plugin_path = CommandLine::ForCurrentProcess()->GetSwitchValuePath(
+ switches::kPluginPath);
lazy_tls.Pointer()->Set(this);
#if defined(USE_AURA)
@@ -101,10 +100,10 @@ PluginThread::PluginThread()
PatchNPNFunctions();
// Preload the library to avoid loading, unloading then reloading
- preloaded_plugin_module_ = base::LoadNativeLibrary(plugin_path_, NULL);
+ preloaded_plugin_module_ = base::LoadNativeLibrary(plugin_path, NULL);
scoped_refptr<webkit::npapi::PluginLib> plugin(
- webkit::npapi::PluginLib::CreatePluginLib(plugin_path_));
+ webkit::npapi::PluginLib::CreatePluginLib(plugin_path));
if (plugin.get()) {
plugin->NP_Initialize();
// For OOP plugins the plugin dll will be unloaded during process shutdown