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

Side by Side Diff: ipc/ipc_logging.cc

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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
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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 queue_invoke_later_pending_ = true; 234 queue_invoke_later_pending_ = true;
235 MessageLoop::current()->PostDelayedTask( 235 MessageLoop::current()->PostDelayedTask(
236 FROM_HERE, base::Bind(&Logging::OnSendLogs, base::Unretained(this)), 236 FROM_HERE, base::Bind(&Logging::OnSendLogs, base::Unretained(this)),
237 base::TimeDelta::FromMilliseconds(kLogSendDelayMs)); 237 base::TimeDelta::FromMilliseconds(kLogSendDelayMs));
238 } 238 }
239 } 239 }
240 } 240 }
241 if (enabled_on_stderr_) { 241 if (enabled_on_stderr_) {
242 std::string message_name; 242 std::string message_name;
243 if (data.message_name.empty()) { 243 if (data.message_name.empty()) {
244 message_name = StringPrintf("[unknown type %d]", data.type); 244 message_name = base::StringPrintf("[unknown type %d]", data.type);
245 } else { 245 } else {
246 message_name = data.message_name; 246 message_name = data.message_name;
247 } 247 }
248 double receive_delay = 248 double receive_delay =
249 (Time::FromInternalValue(data.receive) - 249 (Time::FromInternalValue(data.receive) -
250 Time::FromInternalValue(data.sent)).InSecondsF(); 250 Time::FromInternalValue(data.sent)).InSecondsF();
251 double dispatch_delay = 251 double dispatch_delay =
252 (Time::FromInternalValue(data.dispatch) - 252 (Time::FromInternalValue(data.dispatch) -
253 Time::FromInternalValue(data.sent)).InSecondsF(); 253 Time::FromInternalValue(data.sent)).InSecondsF();
254 fprintf(stderr, 254 fprintf(stderr,
(...skipping 51 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

Powered by Google App Engine
This is Rietveld 408576698