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

Side by Side Diff: chrome/browser/ui/views/about_ipc_dialog.cc

Issue 11347012: Split IPC logging between content and chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 1 month 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 | « no previous file | chrome/chrome_common.gypi » ('j') | chrome/tools/ipclist/DEPS » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Need to include this before any other file because it defines 5 // Need to include this before any other file because it defines
6 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define 6 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define
7 // IPC_MESSAGE_MACROS_LOG_ENABLED so that all_messages.h will generate the 7 // IPC_MESSAGE_MACROS_LOG_ENABLED so that all_messages.h will generate the
8 // ViewMsgLog et al. functions. 8 // ViewMsgLog et al. functions.
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 10
11 #ifdef IPC_MESSAGE_LOG_ENABLED 11 #ifdef IPC_MESSAGE_LOG_ENABLED
12 #include "content/public/common/content_ipc_logging.h"
12 #define IPC_MESSAGE_MACROS_LOG_ENABLED 13 #define IPC_MESSAGE_MACROS_LOG_ENABLED
14 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \
15 content::RegisterIPCLogger(msg_id, logger)
13 16
14 // We need to do this real early to be sure IPC_MESSAGE_MACROS_LOG_ENABLED 17 // We need to do this real early to be sure IPC_MESSAGE_MACROS_LOG_ENABLED
15 // doesn't get undefined. 18 // doesn't get undefined.
16 #include "chrome/common/all_messages.h" 19 #include "chrome/common/all_messages.h"
17 20
18 #include "chrome/browser/ui/views/about_ipc_dialog.h" 21 #include "chrome/browser/ui/views/about_ipc_dialog.h"
19 22
20 #include <set> 23 #include <set>
21 24
22 #include "base/memory/singleton.h" 25 #include "base/memory/singleton.h"
(...skipping 25 matching lines...) Expand all
48 enum { 51 enum {
49 kTimeColumn = 0, 52 kTimeColumn = 0,
50 kChannelColumn, 53 kChannelColumn,
51 kMessageColumn, 54 kMessageColumn,
52 kFlagsColumn, 55 kFlagsColumn,
53 kDispatchColumn, 56 kDispatchColumn,
54 kProcessColumn, 57 kProcessColumn,
55 kParamsColumn, 58 kParamsColumn,
56 }; 59 };
57 60
58 // This class registers the browser IPC logger functions with IPC::Logging.
59 class RegisterLoggerFuncs {
60 public:
61 RegisterLoggerFuncs() {
62 IPC::Logging::set_log_function_map(&g_log_function_mapping);
63 }
64 };
65
66 RegisterLoggerFuncs g_register_logger_funcs;
67
68 // The singleton dialog box. This is non-NULL when a dialog is active so we 61 // The singleton dialog box. This is non-NULL when a dialog is active so we
69 // know not to create a new one. 62 // know not to create a new one.
70 AboutIPCDialog* g_active_dialog = NULL; 63 AboutIPCDialog* g_active_dialog = NULL;
71 64
72 std::set<int> disabled_messages; 65 std::set<int> disabled_messages;
73 66
74 // Settings dialog ------------------------------------------------------------- 67 // Settings dialog -------------------------------------------------------------
75 68
76 bool init_done = false; 69 bool init_done = false;
77 HWND settings_dialog = NULL; 70 HWND settings_dialog = NULL;
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 361
369 namespace chrome { 362 namespace chrome {
370 363
371 void ShowAboutIPCDialog() { 364 void ShowAboutIPCDialog() {
372 AboutIPCDialog::RunDialog(); 365 AboutIPCDialog::RunDialog();
373 } 366 }
374 367
375 } // namespace chrome 368 } // namespace chrome
376 369
377 #endif // IPC_MESSAGE_LOG_ENABLED 370 #endif // IPC_MESSAGE_LOG_ENABLED
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_common.gypi » ('j') | chrome/tools/ipclist/DEPS » ('J')

Powered by Google App Engine
This is Rietveld 408576698