summaryrefslogtreecommitdiffstats
path: root/content/plugin
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
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')
-rw-r--r--content/plugin/plugin_thread.cc9
-rw-r--r--content/plugin/plugin_thread.h7
2 files changed, 5 insertions, 11 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
diff --git a/content/plugin/plugin_thread.h b/content/plugin/plugin_thread.h
index d325dd0..1a1183b 100644
--- a/content/plugin/plugin_thread.h
+++ b/content/plugin/plugin_thread.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -28,8 +28,6 @@ class PluginThread : public ChildThread {
// Returns the one plugin thread.
static PluginThread* current();
- FilePath plugin_path() { return plugin_path_; }
-
private:
virtual bool OnControlMessageReceived(const IPC::Message& msg);
@@ -45,9 +43,6 @@ class PluginThread : public ChildThread {
// The plugin module which is preloaded in Init
base::NativeLibrary preloaded_plugin_module_;
- // Points to the plugin file that this process hosts.
- FilePath plugin_path_;
-
DISALLOW_COPY_AND_ASSIGN(PluginThread);
};