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

Side by Side Diff: ipc/ipc_channel_reader.cc

Issue 637023002: Misc. cleanup, primarily removing unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove macros.h change Created 6 years, 2 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
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_channel_reader.h" 5 #include "ipc/ipc_channel_reader.h"
6 6
7 #include "ipc/ipc_listener.h" 7 #include "ipc/ipc_listener.h"
8 #include "ipc/ipc_logging.h" 8 #include "ipc/ipc_logging.h"
9 #include "ipc/ipc_message_macros.h" 9 #include "ipc/ipc_message_macros.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Dispatch all complete messages in the data buffer. 73 // Dispatch all complete messages in the data buffer.
74 while (p < end) { 74 while (p < end) {
75 const char* message_tail = Message::FindNext(p, end); 75 const char* message_tail = Message::FindNext(p, end);
76 if (message_tail) { 76 if (message_tail) {
77 int len = static_cast<int>(message_tail - p); 77 int len = static_cast<int>(message_tail - p);
78 Message m(p, len); 78 Message m(p, len);
79 if (!WillDispatchInputMessage(&m)) 79 if (!WillDispatchInputMessage(&m))
80 return false; 80 return false;
81 81
82 #ifdef IPC_MESSAGE_LOG_ENABLED 82 #ifdef IPC_MESSAGE_LOG_ENABLED
83 Logging* logger = Logging::GetInstance();
84 std::string name; 83 std::string name;
85 logger->GetMessageText(m.type(), &name, &m, NULL); 84 Logging::GetInstance()->GetMessageText(m.type(), &name, &m, NULL);
86 TRACE_EVENT1("ipc,toplevel", "ChannelReader::DispatchInputData", 85 TRACE_EVENT1("ipc,toplevel", "ChannelReader::DispatchInputData",
87 "name", name); 86 "name", name);
88 #else 87 #else
89 TRACE_EVENT2("ipc,toplevel", "ChannelReader::DispatchInputData", 88 TRACE_EVENT2("ipc,toplevel", "ChannelReader::DispatchInputData",
90 "class", IPC_MESSAGE_ID_CLASS(m.type()), 89 "class", IPC_MESSAGE_ID_CLASS(m.type()),
91 "line", IPC_MESSAGE_ID_LINE(m.type())); 90 "line", IPC_MESSAGE_ID_LINE(m.type()));
92 #endif 91 #endif
93 m.TraceMessageEnd(); 92 m.TraceMessageEnd();
94 if (IsInternalMessage(m)) 93 if (IsInternalMessage(m))
95 HandleInternalMessage(m); 94 HandleInternalMessage(m);
(...skipping 12 matching lines...) Expand all
108 input_overflow_buf_.assign(p, end - p); 107 input_overflow_buf_.assign(p, end - p);
109 108
110 if (input_overflow_buf_.empty() && !DidEmptyInputBuffers()) 109 if (input_overflow_buf_.empty() && !DidEmptyInputBuffers())
111 return false; 110 return false;
112 return true; 111 return true;
113 } 112 }
114 113
115 114
116 } // namespace internal 115 } // namespace internal
117 } // namespace IPC 116 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698