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

Side by Side Diff: chrome/renderer/renderer_logging.h

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
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/renderer/renderer_logging_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_RENDERER_RENDERER_LOGGING_H_
6 #define CHROME_RENDERER_RENDERER_LOGGING_H_
7
8 #include "base/basictypes.h"
9 #include "googleurl/src/gurl.h"
10
11 namespace renderer_logging {
12
13 // Sets the URL that is logged if the renderer crashes. Use GURL() to clear
14 // the URL.
15 void SetActiveRendererURL(const GURL& url);
16
17 // Simple wrapper class that sets the active rendering URL in it's constructor
18 // and clears the active rendering URL in the destructor.
19 class ScopedActiveRenderingURLSetter {
20 public:
21 explicit ScopedActiveRenderingURLSetter(const GURL& url) {
22 SetActiveRendererURL(url);
23 }
24
25 ~ScopedActiveRenderingURLSetter() {
26 SetActiveRendererURL(GURL());
27 }
28
29 private:
30 DISALLOW_COPY_AND_ASSIGN(ScopedActiveRenderingURLSetter);
31 };
32
33 } // namespace renderer_logging
34
35 #if defined(OS_MACOSX) && __OBJC__
36 // Exported for testing purposes.
37
38 @class NSString;
39
40 typedef void (*SetCrashKeyValueFuncPtr)(NSString*, NSString*);
41 typedef void (*ClearCrashKeyValueFuncPtr)(NSString*);
42
43 namespace renderer_logging {
44 void SetActiveRendererURLImpl(const GURL& url,
45 SetCrashKeyValueFuncPtr set_key_func,
46 ClearCrashKeyValueFuncPtr clear_key_func);
47
48 extern const int kMaxNumCrashURLChunks;
49 extern const int kMaxNumURLChunkValueLength;
50 extern const char *kUrlChunkFormatStr;
51 } // namespace renderer_logging
52
53 #endif // defined(OS_MACOSX) && __OBJC__
54
55 #endif // CHROME_RENDERER_RENDERER_LOGGING_H_
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/renderer/renderer_logging_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698