summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 02:15:56 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 02:15:56 +0000
commit5fe064754487a860eb6d88813ab5d85408f9098a (patch)
treeef902ef26fcaf76c35a9a7aaf2e1e5066b14436f
parent71a418ccaceeea49dc8049b01a17a501e8070157 (diff)
downloadchromium_src-5fe064754487a860eb6d88813ab5d85408f9098a.zip
chromium_src-5fe064754487a860eb6d88813ab5d85408f9098a.tar.gz
chromium_src-5fe064754487a860eb6d88813ab5d85408f9098a.tar.bz2
Linux: Revert r33888. We no longer need to collect the list of loaded plugins since we do not unload them now, thus they already show up in the module list.
BUG=none TEST=none Review URL: http://codereview.chromium.org/551122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36937 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/DEPS1
-rw-r--r--chrome/app/breakpad_linux.cc54
-rw-r--r--chrome/app/breakpad_linux.h2
-rw-r--r--chrome/browser/crash_handler_host_linux.cc2
-rw-r--r--webkit/glue/plugins/plugin_list.cc29
-rw-r--r--webkit/glue/plugins/plugin_list.h5
6 files changed, 1 insertions, 92 deletions
diff --git a/chrome/app/DEPS b/chrome/app/DEPS
index 5bdf2b6..ef4974d 100644
--- a/chrome/app/DEPS
+++ b/chrome/app/DEPS
@@ -4,5 +4,4 @@ include_rules = [
"+chrome/installer",
"+sandbox",
"+tools/memory_watcher",
- "+webkit/glue/plugins", # For GetPluginList() on Linux.
]
diff --git a/chrome/app/breakpad_linux.cc b/chrome/app/breakpad_linux.cc
index 832c4ec..e526659 100644
--- a/chrome/app/breakpad_linux.cc
+++ b/chrome/app/breakpad_linux.cc
@@ -33,7 +33,6 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/google_update_settings.h"
-#include "webkit/glue/plugins/plugin_list.h"
static const char kUploadURL[] =
"https://clients2.google.com/cr/report";
@@ -207,11 +206,6 @@ pid_t HandleCrashDump(const BreakpadInfo& info) {
// BOUNDARY \r\n (7, 8)
//
// zero or more:
- // Content-Disposition: form-data; name="plugin-chunk-1" \r\n \r\n (0..5)
- // abcdef \r\n (6, 7)
- // BOUNDARY \r\n (8, 9)
- //
- // zero or more:
// Content-Disposition: form-data; name="url-chunk-1" \r\n \r\n (0..5)
// abcdef \r\n (6, 7)
// BOUNDARY \r\n (8, 9)
@@ -236,7 +230,6 @@ pid_t HandleCrashDump(const BreakpadInfo& info) {
static const char dump_msg[] = "upload_file_minidump\"; filename=\"dump\"";
static const char content_type_msg[] =
"Content-Type: application/octet-stream";
- static const char plugin_chunk_msg[] = "plugin-chunk-";
static const char url_chunk_msg[] = "url-chunk-";
static const char process_time_msg[] = "ptime";
static const char process_type_msg[] = "ptype";
@@ -396,50 +389,6 @@ pid_t HandleCrashDump(const BreakpadInfo& info) {
sys_writev(fd, iov, 9);
}
- // For browser process.
- if (info.plugin_list_length) {
- unsigned i = 0, done = 0, plugin_length = info.plugin_list_length;
- static const unsigned kMaxPluginChunkSize = 64;
- static const unsigned kMaxPluginLength = 8 * kMaxPluginChunkSize;
- if (plugin_length > kMaxPluginLength)
- plugin_length = kMaxPluginLength;
-
- while (plugin_length) {
- char num[16];
- const unsigned num_len = my_int_len(++i);
- my_itos(num, i, num_len);
-
- iov[0].iov_base = const_cast<char*>(form_data_msg);
- iov[0].iov_len = sizeof(form_data_msg) - 1;
- iov[1].iov_base = const_cast<char*>(plugin_chunk_msg);
- iov[1].iov_len = sizeof(plugin_chunk_msg) - 1;
- iov[2].iov_base = num;
- iov[2].iov_len = num_len;
- iov[3].iov_base = const_cast<char*>(quote_msg);
- iov[3].iov_len = sizeof(quote_msg);
- iov[4].iov_base = const_cast<char*>(rn);
- iov[4].iov_len = sizeof(rn);
- iov[5].iov_base = const_cast<char*>(rn);
- iov[5].iov_len = sizeof(rn);
-
- const unsigned len = plugin_length > kMaxPluginChunkSize ?
- kMaxPluginChunkSize : plugin_length;
- iov[6].iov_base = const_cast<char*>(info.plugin_list + done);
- iov[6].iov_len = len;
- iov[7].iov_base = const_cast<char*>(rn);
- iov[7].iov_len = sizeof(rn);
- iov[8].iov_base = mime_boundary;
- iov[8].iov_len = sizeof(mime_boundary) - 1;
- iov[9].iov_base = const_cast<char*>(rn);
- iov[9].iov_len = sizeof(rn);
-
- sys_writev(fd, iov, 10);
-
- done += len;
- plugin_length -= len;
- }
- }
-
// For rendererers and plugins.
if (info.crash_url_length) {
unsigned i = 0, done = 0, crash_url_length = info.crash_url_length;
@@ -647,7 +596,6 @@ static bool CrashDone(const char* dump_path,
memcpy(path + dump_path_len + 1 + minidump_id_len, ".dmp", 4);
path[dump_path_len + 1 + minidump_id_len + 4] = 0;
- std::string* plugin_list = NPAPI::PluginList::GetLoadedPlugins();
BreakpadInfo info;
info.filename = path;
info.process_type = "browser";
@@ -658,8 +606,6 @@ static bool CrashDone(const char* dump_path,
info.guid_length = google_update::posix_guid.length();
info.distro = base::linux_distro.data();
info.distro_length = base::linux_distro.length();
- info.plugin_list = plugin_list->data();
- info.plugin_list_length = plugin_list->length();
info.upload = upload;
HandleCrashDump(info);
diff --git a/chrome/app/breakpad_linux.h b/chrome/app/breakpad_linux.h
index 1d89d62..7cf73e70 100644
--- a/chrome/app/breakpad_linux.h
+++ b/chrome/app/breakpad_linux.h
@@ -24,8 +24,6 @@ struct BreakpadInfo {
unsigned guid_length;
const char* distro;
unsigned distro_length;
- const char* plugin_list;
- unsigned plugin_list_length;
bool upload;
};
diff --git a/chrome/browser/crash_handler_host_linux.cc b/chrome/browser/crash_handler_host_linux.cc
index b779a5f9..dc803ec 100644
--- a/chrome/browser/crash_handler_host_linux.cc
+++ b/chrome/browser/crash_handler_host_linux.cc
@@ -233,8 +233,6 @@ void CrashHandlerHostLinux::OnFileCanReadWithoutBlocking(int fd) {
info.guid_length = strlen(guid);
info.distro = distro;
info.distro_length = strlen(distro);
- info.plugin_list = "";
- info.plugin_list_length = 0;
info.upload = upload;
HandleCrashDump(info);
}
diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc
index ec4a80b..f7643b4 100644
--- a/webkit/glue/plugins/plugin_list.cc
+++ b/webkit/glue/plugins/plugin_list.cc
@@ -15,13 +15,6 @@
#include "webkit/glue/webkit_glue.h"
#include "googleurl/src/gurl.h"
-#if defined(USE_LINUX_BREAKPAD)
-namespace {
-// Comma-separated list of loaded plugin filenames.
-std::string loaded_plugin_list;
-} // anonymous namespace
-#endif
-
namespace NPAPI {
base::LazyInstance<PluginList> g_singleton(base::LINKER_INITIALIZED);
@@ -81,14 +74,7 @@ bool PluginList::ReadPluginInfo(const FilePath &filename,
// Not an internal plugin.
*entry_points = NULL;
- bool ret = PluginLib::ReadWebPluginInfo(filename, info);
-
-#if defined(USE_LINUX_BREAKPAD)
- if (ret)
- loaded_plugin_list.append(filename.BaseName().value() + ",");
-#endif
-
- return ret;
+ return PluginLib::ReadWebPluginInfo(filename, info);
}
bool PluginList::CreateWebPluginInfo(const PluginVersionInfo& pvi,
@@ -175,10 +161,6 @@ void PluginList::LoadPlugins(bool refresh) {
internal_plugins = internal_plugins_;
}
-#if defined(USE_LINUX_BREAKPAD)
- loaded_plugin_list.clear();
-#endif
-
base::TimeTicks start_time = base::TimeTicks::Now();
std::vector<WebPluginInfo> new_plugins;
@@ -366,13 +348,4 @@ void PluginList::Shutdown() {
// TODO
}
-#if defined(USE_LINUX_BREAKPAD)
-// static
-// WARNING: This is called when we are in the middle of a browser crash.
-// This function may not call into libc nor allocate memory.
-std::string* PluginList::GetLoadedPlugins() {
- return &loaded_plugin_list;
-}
-#endif
-
} // namespace NPAPI
diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h
index e16f5ea..9987553 100644
--- a/webkit/glue/plugins/plugin_list.h
+++ b/webkit/glue/plugins/plugin_list.h
@@ -130,11 +130,6 @@ class PluginList {
void LoadPlugin(const FilePath& filename,
std::vector<WebPluginInfo>* plugins);
-#if defined(USE_LINUX_BREAKPAD)
- // Get a comma separated string with the list of successfully loaded plugins.
- static std::string* GetLoadedPlugins();
-#endif
-
private:
// Constructors are private for singletons
PluginList();