Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: chrome/renderer/renderer_logging_win.cc

Issue 155238: Add the page url to plugin crashes to aid debugging. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/renderer/renderer_logging.h"
6
7 #include <windows.h>
8
9 #include "base/string_util.h"
10 #include "chrome/common/chrome_constants.h"
11 #include "googleurl/src/gurl.h"
12
13 namespace renderer_logging {
14
15 typedef void (__cdecl *MainSetActiveRendererURL)(const wchar_t*);
16
17 // Sets the URL that is logged if the renderer crashes. Use GURL() to clear
18 // the URL.
19 void SetActiveRendererURL(const GURL& url) {
20 HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
21 if (!exe_module)
22 return;
23
24 MainSetActiveRendererURL set_active_renderer_url =
25 reinterpret_cast<MainSetActiveRendererURL>(
26 GetProcAddress(exe_module, "SetActiveRendererURL"));
27 if (!set_active_renderer_url)
28 return;
29
30 (set_active_renderer_url)(UTF8ToWide(url.possibly_invalid_spec()).c_str());
31 }
32
33 } // namespace renderer_logging
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_logging_mac_unittest.mm ('k') | chrome/renderer/webplugin_delegate_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698