Commit 65249aaa authored by mfoltz@chromium.org's avatar mfoltz@chromium.org

Reformats how auth message is converted to string for logging, so it doesn't...

Reformats how auth message is converted to string for logging, so it doesn't log binary data and prints on one line.

TESTED=chrome --vmodule="cast_auth*=1"
BUG=365452

Review URL: https://codereview.chromium.org/250713002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266705 0039d316-1c4b-4281-b951-d872f2087c98
parent 7165eebb
...@@ -107,17 +107,18 @@ std::string CastMessageToString(const CastMessage& message_proto) { ...@@ -107,17 +107,18 @@ std::string CastMessageToString(const CastMessage& message_proto) {
std::string AuthMessageToString(const DeviceAuthMessage& message) { std::string AuthMessageToString(const DeviceAuthMessage& message) {
std::string out("{"); std::string out("{");
if (message.has_challenge()) { if (message.has_challenge()) {
out += "\n challenge = {},"; out += "challenge: {}, ";
} }
if (message.has_response()) { if (message.has_response()) {
out += "\n response = {"; out += "response: {signature: (";
out += "\n signature = " + message.response().signature(); out += base::UintToString(message.response().signature().length());
out += "\n, certificate = " + out += " bytes), certificate: (";
message.response().client_auth_certificate(); out += base::UintToString(
out += "\n }"; message.response().client_auth_certificate().length());
out += " bytes)}";
} }
if (message.has_error()) { if (message.has_error()) {
out += "\n error = {"; out += ", error: {";
out += base::IntToString(message.error().error_type()); out += base::IntToString(message.error().error_type());
out += "}"; out += "}";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment