summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 21:39:04 +0000
committeravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 21:39:04 +0000
commit28ab7f9770e0096536e5277c62f5463625f152bd (patch)
treefd7db6edfb8ad20a39944ac3d438d2ca4738c1fb /chrome/browser
parentd7bb1f68d48f5939c9579fbfacd82389096b776c (diff)
downloadchromium_src-28ab7f9770e0096536e5277c62f5463625f152bd.zip
chromium_src-28ab7f9770e0096536e5277c62f5463625f152bd.tar.gz
chromium_src-28ab7f9770e0096536e5277c62f5463625f152bd.tar.bz2
Change "dll" to "plugin" where appropriate.
Review URL: http://codereview.chromium.org/16543 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7617 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/metrics_service.cc6
-rw-r--r--chrome/browser/metrics_service.h2
-rw-r--r--chrome/browser/plugin_process_host.cc36
-rw-r--r--chrome/browser/plugin_process_host.h8
-rw-r--r--chrome/browser/plugin_service.cc31
-rw-r--r--chrome/browser/plugin_service.h16
-rw-r--r--chrome/browser/task_manager_resource_providers.cc2
7 files changed, 52 insertions, 49 deletions
diff --git a/chrome/browser/metrics_service.cc b/chrome/browser/metrics_service.cc
index 7a11a3c..7909a0b 100644
--- a/chrome/browser/metrics_service.cc
+++ b/chrome/browser/metrics_service.cc
@@ -81,7 +81,7 @@
// are:
//
// INITIALIZED, // Constructor was called.
-// PLUGIN_LIST_REQUESTED, // Waiting for DLL list to be loaded.
+// PLUGIN_LIST_REQUESTED, // Waiting for plugin list to be loaded.
// PLUGIN_LIST_ARRIVED, // Waiting for timer to send initial log.
// INITIAL_LOG_READY, // Initial log generated, and waiting for reply.
// SEND_OLD_INITIAL_LOGS, // Sending unsent logs from previous session.
@@ -94,7 +94,7 @@
// The MS has been constructed, but has taken no actions to compose the
// initial log.
//
-// PLUGIN_LIST_REQUESTED, // Waiting for DLL list to be loaded.
+// PLUGIN_LIST_REQUESTED, // Waiting for plugin list to be loaded.
// Typically about 30 seconds after startup, a task is sent to a second thread
// to get the list of plugins. That task will (when complete) make an async
// callback (via a Task) to indicate the completion.
@@ -730,7 +730,7 @@ void MetricsService::AddOrRemoveObserver(NotificationObserver* observer,
void MetricsService::PushPendingLogsToUnsentLists() {
if (state_ < INITIAL_LOG_READY)
- return; // We didn't and still don't have time to get DLL list etc.
+ return; // We didn't and still don't have time to get plugin list etc.
if (pending_log()) {
PreparePendingLogText();
diff --git a/chrome/browser/metrics_service.h b/chrome/browser/metrics_service.h
index a7072c5..8f2f827 100644
--- a/chrome/browser/metrics_service.h
+++ b/chrome/browser/metrics_service.h
@@ -108,7 +108,7 @@ class MetricsService : public NotificationObserver,
// See metrics_service.cc for description of this lifecycle.
enum State {
INITIALIZED, // Constructor was called.
- PLUGIN_LIST_REQUESTED, // Waiting for DLL list to be loaded.
+ PLUGIN_LIST_REQUESTED, // Waiting for plugin list to be loaded.
PLUGIN_LIST_ARRIVED, // Waiting for timer to send initial log.
INITIAL_LOG_READY, // Initial log generated, and waiting for reply.
SEND_OLD_INITIAL_LOGS, // Sending unsent logs from previous session.
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 351d586..9249802 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -48,24 +48,24 @@ static const char kDefaultPluginFinderURL[] =
class PluginNotificationTask : public Task {
public:
PluginNotificationTask(NotificationType notification_type,
- FilePath dll_path,
+ FilePath plugin_path,
HANDLE process);
virtual void Run();
private:
NotificationType notification_type_;
- FilePath dll_path_;
+ FilePath plugin_path_;
HANDLE process_;
};
PluginNotificationTask::PluginNotificationTask(
NotificationType notification_type,
- FilePath dll_path,
+ FilePath plugin_path,
HANDLE process)
: notification_type_(notification_type),
process_(process),
- dll_path_(dll_path) {
+ plugin_path_(plugin_path) {
}
void PluginNotificationTask::Run() {
@@ -82,7 +82,7 @@ void PluginNotificationTask::Run() {
return;
}
- PluginProcessInfo ppi(dll_path_, process_);
+ PluginProcessInfo ppi(plugin_path_, process_);
// As mentioned in the notification_types.h, the PluginProcessInfo details
// are only valid for the time of the notification.
NotificationService::current()->
@@ -361,12 +361,12 @@ PluginProcessHost::~PluginProcessHost() {
}
}
-bool PluginProcessHost::Init(const FilePath& dll,
+bool PluginProcessHost::Init(const FilePath& plugin_path,
const std::string& activex_clsid,
const std::wstring& locale) {
DCHECK(channel_.get() == NULL);
- plugin_path_ = dll;
+ plugin_path_ = plugin_path;
channel_id_ = GenerateRandomChannelID(this);
channel_.reset(new IPC::Channel(channel_id_,
IPC::Channel::MODE_SERVER,
@@ -374,14 +374,14 @@ bool PluginProcessHost::Init(const FilePath& dll,
if (!channel_->Connect())
return false;
- // build command line for plugin, we have to quote the dll path to deal with
- // spaces.
- std::wstring plugin_path;
- if (!PathService::Get(base::FILE_EXE, &plugin_path))
+ // build command line for plugin, we have to quote the plugin's path to deal
+ // with spaces.
+ std::wstring exe_path;
+ if (!PathService::Get(base::FILE_EXE, &exe_path))
return false;
std::wstring cmd_line(L"\"");
- cmd_line += plugin_path;
+ cmd_line += exe_path;
cmd_line += L"\"";
if (logging::DialogsAreSuppressed())
CommandLine::AppendSwitch(&cmd_line, switches::kNoErrorDialogs);
@@ -439,7 +439,7 @@ bool PluginProcessHost::Init(const FilePath& dll,
CommandLine::AppendSwitchWithValue(&cmd_line,
switches::kPluginPath,
- dll.ToWStringHack());
+ plugin_path.ToWStringHack());
bool in_sandbox = !browser_command_line.HasSwitch(switches::kNoSandbox) &&
browser_command_line.HasSwitch(switches::kSafePlugins);
@@ -458,7 +458,8 @@ bool PluginProcessHost::Init(const FilePath& dll,
std::wstring trusted_plugins =
browser_command_line.GetSwitchValue(switches::kTrustedPlugins);
- if (!AddPolicyForPlugin(dll, activex_clsid, trusted_plugins, policy)) {
+ if (!AddPolicyForPlugin(plugin_path, activex_clsid, trusted_plugins,
+ policy)) {
NOTREACHED();
return false;
}
@@ -468,7 +469,7 @@ bool PluginProcessHost::Init(const FilePath& dll,
return false;
}
- result = broker_service->SpawnTarget(plugin_path.c_str(),
+ result = broker_service->SpawnTarget(exe_path.c_str(),
cmd_line.c_str(), policy, &target);
policy->Release();
if (sandbox::SBOX_ALL_OK != result)
@@ -495,8 +496,9 @@ bool PluginProcessHost::Init(const FilePath& dll,
FilePath gears_path;
if (PathService::Get(chrome::FILE_GEARS_PLUGIN, &gears_path)) {
FilePath::StringType gears_path_lc = StringToLowerASCII(gears_path.value());
- FilePath::StringType dll_lc = StringToLowerASCII(dll.value());
- if (dll_lc == gears_path_lc) {
+ FilePath::StringType plugin_path_lc =
+ StringToLowerASCII(plugin_path.value());
+ if (plugin_path_lc == gears_path_lc) {
// Give Gears plugins "background" priority. See
// http://b/issue?id=1280317.
process_.SetProcessBackgrounded(true);
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index fb9dfe8..713c2d4 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -40,10 +40,10 @@ class PluginProcessHost : public IPC::Channel::Listener,
~PluginProcessHost();
// Initialize the new plugin process, returning true on success. This must
- // be called before the object can be used. If dll is the ActiveX-shim, then
- // activex_clsid is the class id of ActiveX control, otherwise activex_clsid
- // is ignored.
- bool Init(const FilePath& dll,
+ // be called before the object can be used. If plugin_path is the
+ // ActiveX-shim, then activex_clsid is the class id of ActiveX control,
+ // otherwise activex_clsid is ignored.
+ bool Init(const FilePath& plugin_path,
const std::string& activex_clsid,
const std::wstring& locale);
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
index a58787c..133eaae 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -59,39 +59,40 @@ const std::wstring& PluginService::GetUILocale() {
return ui_locale_;
}
-PluginProcessHost* PluginService::FindPluginProcess(const FilePath& dll) {
+PluginProcessHost* PluginService::FindPluginProcess(
+ const FilePath& plugin_path) {
DCHECK(MessageLoop::current() ==
ChromeThread::GetMessageLoop(ChromeThread::IO));
- if (dll.value().empty()) {
- NOTREACHED() << "should only be called if we have a plugin dll to load";
+ if (plugin_path.value().empty()) {
+ NOTREACHED() << "should only be called if we have a plugin to load";
return NULL;
}
- PluginMap::iterator found = plugin_hosts_.find(dll);
+ PluginMap::iterator found = plugin_hosts_.find(plugin_path);
if (found != plugin_hosts_.end())
return found->second;
return NULL;
}
PluginProcessHost* PluginService::FindOrStartPluginProcess(
- const FilePath& dll,
+ const FilePath& plugin_path,
const std::string& clsid) {
DCHECK(MessageLoop::current() ==
ChromeThread::GetMessageLoop(ChromeThread::IO));
- PluginProcessHost *plugin_host = FindPluginProcess(dll);
+ PluginProcessHost *plugin_host = FindPluginProcess(plugin_path);
if (plugin_host)
return plugin_host;
// This plugin isn't loaded by any plugin process, so create a new process.
plugin_host = new PluginProcessHost(this);
- if (!plugin_host->Init(dll, clsid, ui_locale_)) {
+ if (!plugin_host->Init(plugin_path, clsid, ui_locale_)) {
DCHECK(false); // Init is not expected to fail
delete plugin_host;
return NULL;
}
- plugin_hosts_[dll] = plugin_host;
+ plugin_hosts_[plugin_path] = plugin_host;
return plugin_host;
// TODO(jabdelmalek): adding a new channel means we can have one less
@@ -106,8 +107,8 @@ void PluginService::OpenChannelToPlugin(
const std::wstring& locale, IPC::Message* reply_msg) {
DCHECK(MessageLoop::current() ==
ChromeThread::GetMessageLoop(ChromeThread::IO));
- FilePath dll = GetPluginPath(url, mime_type, clsid, NULL);
- PluginProcessHost* plugin_host = FindOrStartPluginProcess(dll, clsid);
+ FilePath plugin_path = GetPluginPath(url, mime_type, clsid, NULL);
+ PluginProcessHost* plugin_host = FindOrStartPluginProcess(plugin_path, clsid);
if (plugin_host) {
plugin_host->OpenChannelToPlugin(renderer_msg_filter, mime_type, reply_msg);
} else {
@@ -130,9 +131,9 @@ void PluginService::OnPluginProcessExited(PluginProcessHost* host) {
void PluginService::RemoveHost(PluginProcessHost* host) {
DCHECK(MessageLoop::current() ==
ChromeThread::GetMessageLoop(ChromeThread::IO));
- // Search for the instance rather than lookup by dll path,
+ // Search for the instance rather than lookup by plugin path,
// there is a small window where two instances for the same
- // dll path can co-exists.
+ // plugin path can co-exists.
PluginMap::iterator i = plugin_hosts_.begin();
while (i != plugin_hosts_.end()) {
if (i->second == host) {
@@ -156,10 +157,10 @@ FilePath PluginService::GetPluginPath(const GURL& url,
return info.file;
}
-bool PluginService::GetPluginInfoByDllPath(const FilePath& dll_path,
- WebPluginInfo* info) {
+bool PluginService::GetPluginInfoByPath(const FilePath& plugin_path,
+ WebPluginInfo* info) {
AutoLock lock(lock_);
- return NPAPI::PluginList::Singleton()->GetPluginInfoByDllPath(dll_path, info);
+ return NPAPI::PluginList::Singleton()->GetPluginInfoByPath(plugin_path, info);
}
bool PluginService::HavePluginFor(const std::string& mime_type,
diff --git a/chrome/browser/plugin_service.h b/chrome/browser/plugin_service.h
index e34552a..1355b64 100644
--- a/chrome/browser/plugin_service.h
+++ b/chrome/browser/plugin_service.h
@@ -57,13 +57,13 @@ class PluginService {
// Returns the plugin process host corresponding to the plugin process that
// has been started by this service. Returns NULL if no process has been
// started.
- PluginProcessHost* FindPluginProcess(const FilePath& dll);
+ PluginProcessHost* FindPluginProcess(const FilePath& plugin_path);
// Returns the plugin process host corresponding to the plugin process that
// has been started by this service. This will start a process to host the
- // 'dll' if needed. If the process fails to start, the return value is NULL.
- // Must be called on the IO thread.
- PluginProcessHost* FindOrStartPluginProcess(const FilePath& dll,
+ // 'plugin_path' if needed. If the process fails to start, the return value
+ // is NULL. Must be called on the IO thread.
+ PluginProcessHost* FindOrStartPluginProcess(const FilePath& plugin_path,
const std::string& clsid);
// Opens a channel to a plugin process for the given mime type, starting
@@ -90,9 +90,9 @@ class PluginService {
const std::string& clsid,
std::string* actual_mime_type);
- // Get plugin info by matching full dll path.
- bool GetPluginInfoByDllPath(const FilePath& dll_path,
- WebPluginInfo* info);
+ // Get plugin info by matching full path.
+ bool GetPluginInfoByPath(const FilePath& plugin_path,
+ WebPluginInfo* info);
// Returns true if the plugin's mime-type supports a given mime-type.
// Checks for absolute matching and wildcards. mime-types should be in
@@ -120,7 +120,7 @@ class PluginService {
// Shutdown handler which executes in the context of the IO thread.
void OnShutdown();
- // mapping between plugin dll path and PluginProcessHost
+ // mapping between plugin path and PluginProcessHost
typedef base::hash_map<FilePath, PluginProcessHost*> PluginMap;
PluginMap plugin_hosts_;
diff --git a/chrome/browser/task_manager_resource_providers.cc b/chrome/browser/task_manager_resource_providers.cc
index 71ed524..7167957 100644
--- a/chrome/browser/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager_resource_providers.cc
@@ -249,7 +249,7 @@ std::wstring TaskManagerPluginProcessResource::GetTitle() const {
std::wstring plugin_name;
WebPluginInfo info;
if (PluginService::GetInstance()->
- GetPluginInfoByDllPath(plugin_process_.plugin_path(), &info))
+ GetPluginInfoByPath(plugin_process_.plugin_path(), &info))
plugin_name = info.name;
else
plugin_name = l10n_util::GetString(IDS_TASK_MANAGER_UNKNOWN_PLUGIN_NAME);