summaryrefslogtreecommitdiffstats
path: root/content/browser/plugin_process_host.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 06:41:22 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 06:41:22 +0000
commite87bdbbbe4be0a1459300cace2d2232d34c8d7bd (patch)
tree1306de450a434c8737513afaf7697b2acfdcfa65 /content/browser/plugin_process_host.cc
parentd9a7c6b63aaa1cc681c0f0cf523d5428faefbae1 (diff)
downloadchromium_src-e87bdbbbe4be0a1459300cace2d2232d34c8d7bd.zip
chromium_src-e87bdbbbe4be0a1459300cace2d2232d34c8d7bd.tar.gz
chromium_src-e87bdbbbe4be0a1459300cace2d2232d34c8d7bd.tar.bz2
Collect more data to send in crash reports for a crasher that's stumping me.
BUG=302530 R=brettw@chromium.org Review URL: https://codereview.chromium.org/25555006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226398 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/plugin_process_host.cc')
-rw-r--r--content/browser/plugin_process_host.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc
index e22b32f..f71fa73 100644
--- a/content/browser/plugin_process_host.cc
+++ b/content/browser/plugin_process_host.cc
@@ -19,6 +19,7 @@
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/path_service.h"
+#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/browser_child_process_host_impl.h"
@@ -412,12 +413,31 @@ void PluginProcessHost::OnChannelCreated(
void PluginProcessHost::OnChannelDestroyed(int renderer_id) {
resource_context_map_.erase(renderer_id);
+ removed_pids_.insert(renderer_id);
}
void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request,
ResourceContext** resource_context,
net::URLRequestContext** request_context) {
*resource_context = resource_context_map_[request.origin_pid];
+ if (!*resource_context) {
+ std::string url = request.first_party_for_cookies.spec();
+ // Debugging http://crbug.com/302530
+ url += std::string("_") + base::IntToString(request.origin_pid);
+
+ for (std::map<int, ResourceContext*>::iterator i =
+ resource_context_map_.begin();
+ i != resource_context_map_.end(); ++i) {
+ url += std::string("_") + base::IntToString(i->first);
+ }
+
+ url += "_";
+ for (std::set<int>::iterator i = removed_pids_.begin();
+ i != removed_pids_.end(); ++i) {
+ url += std::string("_") + base::IntToString(*i);
+ }
+ GetContentClient()->SetActiveURL(GURL(url));
+ }
*request_context = (*resource_context)->GetRequestContext();
}