summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/renderer_logging_win.cc
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-30 21:24:07 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-30 21:24:07 +0000
commitfcf195410ee81b7444469c2863e5d2416fe1688a (patch)
tree92f61230bbe69b7a2b0fcb1b15c867003054ee8c /chrome/renderer/renderer_logging_win.cc
parent161ce86fc859484708d88e68b31af9ad28abafa6 (diff)
downloadchromium_src-fcf195410ee81b7444469c2863e5d2416fe1688a.zip
chromium_src-fcf195410ee81b7444469c2863e5d2416fe1688a.tar.gz
chromium_src-fcf195410ee81b7444469c2863e5d2416fe1688a.tar.bz2
* Breakpad on OSX now works with stock Breakpad framwork.
* We now add all the same Metadata on OS X as we do on Windows. * Made the code for logging URLs in crash dumps a little more x-platform. Remove custom Breakpad hacks so we can use an unmodified version of the Framework. Review URL: http://codereview.chromium.org/55028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_logging_win.cc')
-rw-r--r--chrome/renderer/renderer_logging_win.cc33
1 files changed, 33 insertions, 0 deletions
diff --git a/chrome/renderer/renderer_logging_win.cc b/chrome/renderer/renderer_logging_win.cc
new file mode 100644
index 0000000..6d1b758
--- /dev/null
+++ b/chrome/renderer/renderer_logging_win.cc
@@ -0,0 +1,33 @@
+// 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/renderer/renderer_logging.h"
+
+#include <windows.h>
+
+#include "base/string_util.h"
+#include "chrome/common/chrome_constants.h"
+#include "googleurl/src/gurl.h"
+
+namespace renderer_logging {
+
+typedef void (__cdecl *MainSetActiveRendererURL)(const wchar_t*);
+
+// Sets the URL that is logged if the renderer crashes. Use GURL() to clear
+// the URL.
+void SetActiveRendererURL(const GURL& url) {
+ HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
+ if (!exe_module)
+ return;
+
+ MainSetActiveRendererURL set_active_renderer_url =
+ reinterpret_cast<MainSetActiveRendererURL>(
+ GetProcAddress(exe_module, "SetActiveRendererURL"));
+ if (!set_active_renderer_url)
+ return;
+
+ (set_active_renderer_url)(UTF8ToWide(url.possibly_invalid_spec()).c_str());
+}
+
+} // namespace renderer_logging