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

Side by Side Diff: chrome/common/logging_chrome.cc

Issue 2847003005: Reland "Add enable_ipc_logging build argument" (Closed)
Patch Set: Reland "Add enable_ipc_logging build argument" Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/service/service_ipc_server.cc » ('j') | no next file with comments »
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 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 // Need to include this before most other files because it defines 7 // Need to include this before most other files because it defines
8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define 8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define
9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the 9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the
10 // ViewMsgLog et al. functions. 10 // ViewMsgLog et al. functions.
11 #include "ipc/ipc_message.h" 11 #include "ipc/ipc_features.h"
12 12
13 // On Windows, the about:ipc dialog shows IPCs; on POSIX, we hook up a 13 // On Windows, the about:ipc dialog shows IPCs; on POSIX, we hook up a
14 // logger in this file. (We implement about:ipc on Mac but implement 14 // logger in this file. (We implement about:ipc on Mac but implement
15 // the loggers here anyway). We need to do this real early to be sure 15 // the loggers here anyway). We need to do this real early to be sure
16 // IPC_MESSAGE_MACROS_LOG_ENABLED doesn't get undefined. 16 // IPC_MESSAGE_MACROS_LOG_ENABLED doesn't get undefined.
17 #if defined(OS_POSIX) && defined(IPC_MESSAGE_LOG_ENABLED) 17 #if defined(OS_POSIX) && BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)
18 #define IPC_MESSAGE_MACROS_LOG_ENABLED 18 #define IPC_MESSAGE_MACROS_LOG_ENABLED
19 #include "content/public/common/content_ipc_logging.h" 19 #include "content/public/common/content_ipc_logging.h"
20 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \ 20 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \
21 content::RegisterIPCLogger(msg_id, logger) 21 content::RegisterIPCLogger(msg_id, logger)
22 #include "chrome/common/all_messages.h" 22 #include "chrome/common/all_messages.h"
23 #endif 23 #endif
24 24
25 #if defined(OS_WIN) 25 #if defined(OS_WIN)
26 #include <windows.h> 26 #include <windows.h>
27 #endif 27 #endif
28 28
29 #include "chrome/common/logging_chrome.h" 29 #include "chrome/common/logging_chrome.h"
30 30
31 #include <fstream> // NOLINT 31 #include <fstream> // NOLINT
32 #include <memory> // NOLINT 32 #include <memory> // NOLINT
33 #include <string> // NOLINT 33 #include <string> // NOLINT
34 34
35 #include "base/base_switches.h" 35 #include "base/base_switches.h"
36 #include "base/bind.h"
36 #include "base/command_line.h" 37 #include "base/command_line.h"
37 #include "base/compiler_specific.h" 38 #include "base/compiler_specific.h"
38 #include "base/debug/debugger.h" 39 #include "base/debug/debugger.h"
39 #include "base/debug/dump_without_crashing.h" 40 #include "base/debug/dump_without_crashing.h"
40 #include "base/environment.h" 41 #include "base/environment.h"
41 #include "base/files/file_path.h" 42 #include "base/files/file_path.h"
42 #include "base/files/file_util.h" 43 #include "base/files/file_util.h"
43 #include "base/metrics/statistics_recorder.h" 44 #include "base/metrics/statistics_recorder.h"
44 #include "base/path_service.h" 45 #include "base/path_service.h"
45 #include "base/strings/string_number_conversions.h" 46 #include "base/strings/string_number_conversions.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 time_deets.year, 422 time_deets.year,
422 time_deets.month, 423 time_deets.month,
423 time_deets.day_of_month, 424 time_deets.day_of_month,
424 time_deets.hour, 425 time_deets.hour,
425 time_deets.minute, 426 time_deets.minute,
426 time_deets.second); 427 time_deets.second);
427 return base_path.InsertBeforeExtensionASCII(suffix); 428 return base_path.InsertBeforeExtensionASCII(suffix);
428 } 429 }
429 430
430 } // namespace logging 431 } // namespace logging
OLDNEW
« no previous file with comments | « no previous file | chrome/service/service_ipc_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698