Chromium Code Reviews| Index: chrome/renderer/user_script_slave.cc |
| diff --git a/chrome/renderer/user_script_slave.cc b/chrome/renderer/user_script_slave.cc |
| index 73f25378b210ac9a080d7701cbaeadfdccd55e85..68dec433471cfaedb7ea8e87babf001dbc009167 100644 |
| --- a/chrome/renderer/user_script_slave.cc |
| +++ b/chrome/renderer/user_script_slave.cc |
| @@ -5,12 +5,15 @@ |
| #include "chrome/renderer/user_script_slave.h" |
| #include "app/resource_bundle.h" |
| +#include "base/command_line.h" |
| #include "base/histogram.h" |
| #include "base/logging.h" |
| #include "base/perftimer.h" |
| #include "base/pickle.h" |
| #include "base/shared_memory.h" |
| #include "base/string_util.h" |
| +#include "chrome/common/child_process_logging.h" |
| +#include "chrome/common/chrome_switches.h" |
| #include "chrome/common/extensions/extension.h" |
| #include "chrome/common/extensions/extension_constants.h" |
| #include "chrome/renderer/extension_groups.h" |
| @@ -111,6 +114,24 @@ bool UserScriptSlave::UpdateScripts(base::SharedMemoryHandle shared_memory) { |
| } |
| } |
| + // Update the crash reporter with all loaded extensions. In single process, |
| + // this has already been done in the browser code. |
| + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) { |
| + std::vector<std::string> extension_ids; |
| + for (size_t i = 0; i < num_scripts; ++i) { |
| + DCHECK(!scripts_[i]->extension_id().empty()); |
| + |
| + // We must check this because there can be multiple scripts from a single |
| + // extension. n^2, but meh, it's a small list. |
| + if (std::find(extension_ids.begin(), extension_ids.end(), |
| + scripts_[i]->extension_id()) == extension_ids.end()) { |
|
Erik does not do reviews
2009/11/30 06:41:37
good catch
|
| + extension_ids.push_back(scripts_[i]->extension_id()); |
| + } |
| + } |
| + |
| + child_process_logging::SetActiveExtensions(extension_ids); |
| + } |
| + |
| return true; |
| } |