summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_process_logging_linux.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 21:40:55 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 21:40:55 +0000
commitef9162785c55957324e72f737bb9b6b2406053dd (patch)
treed8c4b934a957eff37caffa911c91066fe27e04fb /chrome/common/child_process_logging_linux.cc
parent9e6f8526f9a60410b6d448103a9015d72a067deb (diff)
downloadchromium_src-ef9162785c55957324e72f737bb9b6b2406053dd.zip
chromium_src-ef9162785c55957324e72f737bb9b6b2406053dd.tar.gz
chromium_src-ef9162785c55957324e72f737bb9b6b2406053dd.tar.bz2
Add the page url to plugin crashes to aid debugging.
Review URL: http://codereview.chromium.org/155238 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20191 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_logging_linux.cc')
-rw-r--r--chrome/common/child_process_logging_linux.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/chrome/common/child_process_logging_linux.cc b/chrome/common/child_process_logging_linux.cc
new file mode 100644
index 0000000..59b16f6
--- /dev/null
+++ b/chrome/common/child_process_logging_linux.cc
@@ -0,0 +1,22 @@
+// Copyright (c) 2009 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.
+
+#include "chrome/common/child_process_logging.h"
+
+#include <string>
+
+#include "base/logging.h"
+#include "googleurl/src/gurl.h"
+
+namespace child_process_logging {
+
+// We use a static string to hold the most recent active url. If we crash, the
+// crash handler code will send the contents of this string to the browser.
+std::string active_url;
+
+void SetActiveURL(const GURL& url) {
+ active_url = url.possibly_invalid_spec();
+}
+
+} // namespace child_process_logging