summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-05 15:53:50 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-05 15:53:50 +0000
commit65033905857424eff7914fadcc57d88beff5f631 (patch)
tree3788711455482b3f734738892825a6245dcd3ca2 /webkit/plugins/ppapi
parentcbb55b773f44aa91b85b64b6c2c644925b79336b (diff)
downloadchromium_src-65033905857424eff7914fadcc57d88beff5f631.zip
chromium_src-65033905857424eff7914fadcc57d88beff5f631.tar.gz
chromium_src-65033905857424eff7914fadcc57d88beff5f631.tar.bz2
Revert 73427 (set the name of the PPAPI plugin correcetly) and 73916 (minor bugfix) to see if it is responsible for the startup performance regression.
TEST=startup perf XP Review URL: http://codereview.chromium.org/6368120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi')
-rw-r--r--webkit/plugins/ppapi/plugin_module.cc6
-rw-r--r--webkit/plugins/ppapi/plugin_module.h9
-rw-r--r--webkit/plugins/ppapi/ppapi_unittest.cc2
3 files changed, 7 insertions, 10 deletions
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index a8d804a..332770ff 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -360,12 +360,10 @@ PluginModule::EntryPoints::EntryPoints()
// PluginModule ----------------------------------------------------------------
-PluginModule::PluginModule(const std::string& name,
- PluginDelegate::ModuleLifetime* lifetime_delegate)
+PluginModule::PluginModule(PluginDelegate::ModuleLifetime* lifetime_delegate)
: lifetime_delegate_(lifetime_delegate),
callback_tracker_(new CallbackTracker),
- library_(NULL),
- name_(name) {
+ library_(NULL) {
pp_module_ = ResourceTracker::Get()->AddModule(this);
GetMainThreadMessageLoop(); // Initialize the main thread message loop.
GetLivePluginSet()->insert(this);
diff --git a/webkit/plugins/ppapi/plugin_module.h b/webkit/plugins/ppapi/plugin_module.h
index 4f3e9c3..cfdfb6af 100644
--- a/webkit/plugins/ppapi/plugin_module.h
+++ b/webkit/plugins/ppapi/plugin_module.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -7,7 +7,6 @@
#include <map>
#include <set>
-#include <string>
#include "base/basictypes.h"
#include "base/native_library.h"
@@ -72,8 +71,7 @@ class PluginModule : public base::RefCounted<PluginModule>,
// The module lifetime delegate is a non-owning pointer that must outlive
// all plugin modules. In practice it will be a global singleton that
// tracks which modules are alive.
- PluginModule(const std::string& name,
- PluginDelegate::ModuleLifetime* lifetime_delegate);
+ PluginModule(PluginDelegate::ModuleLifetime* lifetime_delegate);
~PluginModule();
@@ -100,6 +98,7 @@ class PluginModule : public base::RefCounted<PluginModule>,
// proxy needs this information to set itself up properly).
PP_Module pp_module() const { return pp_module_; }
+ void set_name(const std::string& name) { name_ = name; }
const std::string& name() const { return name_; }
PluginInstance* CreateInstance(PluginDelegate* delegate);
@@ -153,7 +152,7 @@ class PluginModule : public base::RefCounted<PluginModule>,
EntryPoints entry_points_;
// The name of the module.
- const std::string name_;
+ std::string name_;
// Non-owning pointers to all instances associated with this module. When
// there are no more instances, this object should be deleted.
diff --git a/webkit/plugins/ppapi/ppapi_unittest.cc b/webkit/plugins/ppapi/ppapi_unittest.cc
index a9a3637..7ad58c3 100644
--- a/webkit/plugins/ppapi/ppapi_unittest.cc
+++ b/webkit/plugins/ppapi/ppapi_unittest.cc
@@ -87,7 +87,7 @@ void PpapiUnittest::SetUp() {
delegate_.reset(new MockPluginDelegate);
// Initialize the mock module.
- module_ = new PluginModule("Mock plugin", this);
+ module_ = new PluginModule(this);
PluginModule::EntryPoints entry_points;
entry_points.get_interface = &MockGetInterface;
entry_points.initialize_module = &MockInitializeModule;