From 252cad6dec04039d456e716273153951d0090b5f Mon Sep 17 00:00:00 2001 From: "erg@google.com" Date: Wed, 18 Aug 2010 18:33:57 +0000 Subject: 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 --- ipc/ipc_logging.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'ipc/ipc_logging.cc') 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, ¶ms); 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, ¶ms); data->channel = channel; -- cgit v1.1