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

Side by Side Diff: ipc/ipc_logging.cc

Issue 1322253003: ipc: Convert int types from basictypes.h to the ones from stdint.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 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
« no previous file with comments | « ipc/ipc_logging.h ('k') | ipc/ipc_message.h » ('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 "ipc/ipc_logging.h" 5 #include "ipc/ipc_logging.h"
6 6
7 #ifdef IPC_MESSAGE_LOG_ENABLED 7 #ifdef IPC_MESSAGE_LOG_ENABLED
8 #define IPC_MESSAGE_MACROS_LOG_ENABLED 8 #define IPC_MESSAGE_MACROS_LOG_ENABLED
9 #endif 9 #endif
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 GenerateLogData(channel_id, message, &data, true); 160 GenerateLogData(channel_id, message, &data, true);
161 161
162 if (base::MessageLoop::current() == main_thread_) { 162 if (base::MessageLoop::current() == main_thread_) {
163 Log(data); 163 Log(data);
164 } else { 164 } else {
165 main_thread_->task_runner()->PostTask( 165 main_thread_->task_runner()->PostTask(
166 FROM_HERE, base::Bind(&Logging::Log, base::Unretained(this), data)); 166 FROM_HERE, base::Bind(&Logging::Log, base::Unretained(this), data));
167 } 167 }
168 } 168 }
169 169
170 void Logging::GetMessageText(uint32 type, std::string* name, 170 void Logging::GetMessageText(uint32_t type, std::string* name,
171 const Message* message, 171 const Message* message,
172 std::string* params) { 172 std::string* params) {
173 if (!log_function_map_) 173 if (!log_function_map_)
174 return; 174 return;
175 175
176 LogFunctionMap::iterator it = log_function_map_->find(type); 176 LogFunctionMap::iterator it = log_function_map_->find(type);
177 if (it == log_function_map_->end()) { 177 if (it == log_function_map_->end()) {
178 if (name) { 178 if (name) {
179 *name = "[UNKNOWN MSG "; 179 *name = "[UNKNOWN MSG ";
180 *name += base::IntToString(type); 180 *name += base::IntToString(type);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 data->receive = message.received_time(); 306 data->receive = message.received_time();
307 data->dispatch = Time::Now().ToInternalValue(); 307 data->dispatch = Time::Now().ToInternalValue();
308 data->params = params; 308 data->params = params;
309 data->message_name = message_name; 309 data->message_name = message_name;
310 } 310 }
311 } 311 }
312 312
313 } 313 }
314 314
315 #endif // IPC_MESSAGE_LOG_ENABLED 315 #endif // IPC_MESSAGE_LOG_ENABLED
OLDNEW
« no previous file with comments | « ipc/ipc_logging.h ('k') | ipc/ipc_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698