summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/npapi/plugin_group.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/plugins/npapi/plugin_group.cc')
-rw-r--r--webkit/plugins/npapi/plugin_group.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/webkit/plugins/npapi/plugin_group.cc b/webkit/plugins/npapi/plugin_group.cc
index ec1b537..0460198 100644
--- a/webkit/plugins/npapi/plugin_group.cc
+++ b/webkit/plugins/npapi/plugin_group.cc
@@ -112,13 +112,10 @@ void PluginGroup::InitFrom(const PluginGroup& other) {
description_ = other.description_;
update_url_ = other.update_url_;
enabled_ = other.enabled_;
- for (size_t i = 0; i < other.version_ranges_.size(); ++i)
- version_ranges_.push_back(other.version_ranges_[i]);
- DCHECK_EQ(other.web_plugin_infos_.size(), other.web_plugin_positions_.size());
- for (size_t i = 0; i < other.web_plugin_infos_.size(); ++i)
- AddPlugin(other.web_plugin_infos_[i], other.web_plugin_positions_[i]);
- if (!version_.get())
- version_.reset(Version::GetVersionFromString("0"));
+ version_ranges_ = other.version_ranges_;
+ version_.reset(other.version_->Clone());
+ web_plugin_infos_ = other.web_plugin_infos_;
+ web_plugin_positions_ = other.web_plugin_positions_;
}
PluginGroup::PluginGroup(const PluginGroup& other) {
@@ -126,7 +123,6 @@ PluginGroup::PluginGroup(const PluginGroup& other) {
}
PluginGroup& PluginGroup::operator=(const PluginGroup& other) {
- version_ranges_.clear();
InitFrom(other);
return *this;
}
@@ -255,6 +251,10 @@ void PluginGroup::AddPlugin(const WebPluginInfo& plugin, int position) {
UpdateActivePlugin(plugin);
}
+bool PluginGroup::IsEmpty() const {
+ return web_plugin_infos_.empty();
+}
+
string16 PluginGroup::GetGroupName() const {
if (!group_name_.empty())
return group_name_;