OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef IPC_IPC_LOGGING_H_ | 5 #ifndef IPC_IPC_LOGGING_H_ |
6 #define IPC_IPC_LOGGING_H_ | 6 #define IPC_IPC_LOGGING_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. | 9 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // Called in the browser process when logging data from a child process is | 63 // Called in the browser process when logging data from a child process is |
64 // received. | 64 // received. |
65 void OnReceivedLoggingMessage(const Message& message); | 65 void OnReceivedLoggingMessage(const Message& message); |
66 | 66 |
67 void OnSendMessage(Message* message, const std::string& channel_id); | 67 void OnSendMessage(Message* message, const std::string& channel_id); |
68 void OnPreDispatchMessage(const Message& message); | 68 void OnPreDispatchMessage(const Message& message); |
69 void OnPostDispatchMessage(const Message& message, | 69 void OnPostDispatchMessage(const Message& message, |
70 const std::string& channel_id); | 70 const std::string& channel_id); |
71 | 71 |
72 // Returns the name of the logging enabled/disabled events so that the | |
73 // sandbox can add them to to the policy. If true, gets the name of the | |
74 // enabled event, if false, gets the name of the disabled event. | |
75 static std::wstring GetEventName(bool enabled); | |
76 | |
77 // Like the *MsgLog functions declared for each message class, except this | 72 // Like the *MsgLog functions declared for each message class, except this |
78 // calls the correct one based on the message type automatically. Defined in | 73 // calls the correct one based on the message type automatically. Defined in |
79 // ipc_logging.cc. | 74 // ipc_logging.cc. |
80 static void GetMessageText(uint32 type, std::string* name, | 75 static void GetMessageText(uint32 type, std::string* name, |
81 const Message* message, std::string* params); | 76 const Message* message, std::string* params); |
82 | 77 |
83 static void set_log_function_map(LogFunctionMap* functions) { | 78 static void set_log_function_map(LogFunctionMap* functions) { |
84 log_function_map_ = functions; | 79 log_function_map_ = functions; |
85 } | 80 } |
86 | 81 |
(...skipping 20 matching lines...) Expand all Loading... |
107 Consumer* consumer_; | 102 Consumer* consumer_; |
108 | 103 |
109 static LogFunctionMap* log_function_map_; | 104 static LogFunctionMap* log_function_map_; |
110 }; | 105 }; |
111 | 106 |
112 } // namespace IPC | 107 } // namespace IPC |
113 | 108 |
114 #endif // IPC_MESSAGE_LOG_ENABLED | 109 #endif // IPC_MESSAGE_LOG_ENABLED |
115 | 110 |
116 #endif // IPC_IPC_LOGGING_H_ | 111 #endif // IPC_IPC_LOGGING_H_ |
OLD | NEW |