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

Side by Side Diff: ipc/ipc_logging.cc

Issue 9148039: Convert use of int ms to TimeDelta in files owned by jeremy. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove static class initialization. Created 8 years, 11 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_fuzzing_tests.cc ('k') | ipc/ipc_sync_channel_unittest.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) 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 #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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // We're in the browser process. 226 // We're in the browser process.
227 consumer_->Log(data); 227 consumer_->Log(data);
228 } else { 228 } else {
229 // We're in the renderer or plugin processes. 229 // We're in the renderer or plugin processes.
230 if (sender_) { 230 if (sender_) {
231 queued_logs_.push_back(data); 231 queued_logs_.push_back(data);
232 if (!queue_invoke_later_pending_) { 232 if (!queue_invoke_later_pending_) {
233 queue_invoke_later_pending_ = true; 233 queue_invoke_later_pending_ = true;
234 MessageLoop::current()->PostDelayedTask( 234 MessageLoop::current()->PostDelayedTask(
235 FROM_HERE, base::Bind(&Logging::OnSendLogs, base::Unretained(this)), 235 FROM_HERE, base::Bind(&Logging::OnSendLogs, base::Unretained(this)),
236 kLogSendDelayMs); 236 base::TimeDelta::FromMilliseconds(kLogSendDelayMs));
237 } 237 }
238 } 238 }
239 } 239 }
240 if (enabled_on_stderr_) { 240 if (enabled_on_stderr_) {
241 std::string message_name; 241 std::string message_name;
242 if (data.message_name.empty()) { 242 if (data.message_name.empty()) {
243 message_name = StringPrintf("[unknown type %d]", data.type); 243 message_name = StringPrintf("[unknown type %d]", data.type);
244 } else { 244 } else {
245 message_name = data.message_name; 245 message_name = data.message_name;
246 } 246 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 data->receive = message.received_time(); 305 data->receive = message.received_time();
306 data->dispatch = Time::Now().ToInternalValue(); 306 data->dispatch = Time::Now().ToInternalValue();
307 data->params = params; 307 data->params = params;
308 data->message_name = message_name; 308 data->message_name = message_name;
309 } 309 }
310 } 310 }
311 311
312 } 312 }
313 313
314 #endif // IPC_MESSAGE_LOG_ENABLED 314 #endif // IPC_MESSAGE_LOG_ENABLED
OLDNEW
« no previous file with comments | « ipc/ipc_fuzzing_tests.cc ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698