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

Side by Side Diff: content/common/content_debug_logging.cc

Issue 10908078: Code to collect issue 97285 debugging info for crash reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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) 2011 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 "content/public/common/content_debug_logging.h"
6
7 #include "base/logging.h"
8
9 namespace content {
10 namespace debug {
11
12 namespace {
13
14 // These should be initialized by the process in main(), so should be
15 // thread-safe.crbug.com
Bernhard Bauer 2012/09/05 15:04:55 Oops! Google Chrome could not find thread-safe.crb
Scott Hess - ex-Googler 2012/09/05 17:17:05 I have no idea where this came from!
16 RecordMsgFn* g_record_handler = NULL;
17 GetMessagesFn* g_get_handler = NULL;
18
19 } // namespace
20
21 void RegisterMessageHandlers(RecordMsgFn* record_handler,
22 GetMessagesFn* get_handler) {
23 g_record_handler = record_handler;
24 g_get_handler = get_handler;
25 }
26
27 void RecordMsg(int bug_id, const std::string& msg) {
28 DCHECK(g_record_handler);
Bernhard Bauer 2012/09/05 15:04:55 Are these the ones you want to replace with DLOG_I
Scott Hess - ex-Googler 2012/09/05 17:17:05 Yeah, pretty much. Except now I realize that havi
29 if (g_record_handler)
30 (*g_record_handler)(bug_id, msg);
31 }
32
33 bool GetMessages(int bug_id, std::vector<std::string>* msgs) {
34 DCHECK(g_get_handler);
35 if (g_get_handler)
36 return (*g_get_handler)(bug_id, msgs);
37 return false;
38 }
39
40 } // namespace debug
41 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698