summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_logging.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 18:33:57 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 18:33:57 +0000
commit252cad6dec04039d456e716273153951d0090b5f (patch)
tree68437c27571fe3e88317f1f2848573fe647fdbb5 /ipc/ipc_logging.cc
parent371390a71a7e4530b39e46f1f52c5a6d5a3acd43 (diff)
downloadchromium_src-252cad6dec04039d456e716273153951d0090b5f.zip
chromium_src-252cad6dec04039d456e716273153951d0090b5f.tar.gz
chromium_src-252cad6dec04039d456e716273153951d0090b5f.tar.bz2
Remove all wstrings from the IPC logging subsystem.
Changes all IPC Log methods from wstring to string. All static logging debug data changed from wchar[] to char[]. Various string conversion/numeric headers no longer need to be included in ipc_message_utils.h and have been removed (and added in all implementation files that require them). BUG=none TEST=none Review URL: http://codereview.chromium.org/3159013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_logging.cc')
-rw-r--r--ipc/ipc_logging.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/ipc/ipc_logging.cc b/ipc/ipc_logging.cc
index 51b94d2..da857ec 100644
--- a/ipc/ipc_logging.cc
+++ b/ipc/ipc_logging.cc
@@ -161,9 +161,9 @@ void Logging::OnPostDispatchMessage(const Message& message,
}
}
-void Logging::GetMessageText(uint32 type, std::wstring* name,
+void Logging::GetMessageText(uint32 type, std::string* name,
const Message* message,
- std::wstring* params) {
+ std::string* params) {
if (!log_function_mapping_)
return;
@@ -196,14 +196,14 @@ void Logging::Log(const LogData& data) {
if (data.message_name.empty()) {
message_name = StringPrintf("[unknown type %d]", data.type);
} else {
- message_name = WideToASCII(data.message_name);
+ message_name = data.message_name;
}
fprintf(stderr, "ipc %s %d %s %s %s\n",
data.channel.c_str(),
data.routing_id,
- WideToASCII(data.flags).c_str(),
+ data.flags.c_str(),
message_name.c_str(),
- WideToUTF8(data.params).c_str());
+ data.params.c_str());
}
}
@@ -211,27 +211,27 @@ void GenerateLogData(const std::string& channel, const Message& message,
LogData* data) {
if (message.is_reply()) {
// "data" should already be filled in.
- std::wstring params;
+ std::string params;
Logging::GetMessageText(data->type, NULL, &message, &params);
if (!data->params.empty() && !params.empty())
- data->params += L", ";
+ data->params += ", ";
- data->flags += L" DR";
+ data->flags += " DR";
data->params += params;
} else {
- std::wstring flags;
+ std::string flags;
if (message.is_sync())
- flags = L"S";
+ flags = "S";
if (message.is_reply())
- flags += L"R";
+ flags += "R";
if (message.is_reply_error())
- flags += L"E";
+ flags += "E";
- std::wstring params, message_name;
+ std::string params, message_name;
Logging::GetMessageText(message.type(), &message_name, &message, &params);
data->channel = channel;