| Index: content/public/common/common_param_traits.cc
|
| diff --git a/content/public/common/common_param_traits.cc b/content/public/common/common_param_traits.cc
|
| index 1ee5f7b5ec3e61f960f55cfedd8cbd860774fb26..723c33bcb748b31d1f46fef8beef424f7d0abe55 100644
|
| --- a/content/public/common/common_param_traits.cc
|
| +++ b/content/public/common/common_param_traits.cc
|
| @@ -553,4 +553,39 @@ void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::string* l) {
|
| l->append("<SkBitmap>");
|
| }
|
|
|
| +void ParamTraits<content::ConsoleMessageLevel>::Write(Message* m,
|
| + const param_type& p) {
|
| + m->WriteInt(static_cast<int>(p));
|
| +}
|
| +
|
| +bool ParamTraits<content::ConsoleMessageLevel>::Read(const Message* m,
|
| + PickleIterator* iter,
|
| + param_type* p) {
|
| + int type;
|
| + if (!m->ReadInt(iter, &type))
|
| + return false;
|
| + *p = static_cast<param_type>(type);
|
| + return true;
|
| +}
|
| +
|
| +void ParamTraits<content::ConsoleMessageLevel>::Log(const param_type& p,
|
| + std::string* l) {
|
| + std::string level;
|
| + switch (p) {
|
| + case content::CONSOLE_MESSAGE_LEVEL_TIP:
|
| + level = "CONSOLE_MESSAGE_LEVEL_TIP";
|
| + break;
|
| + case content::CONSOLE_MESSAGE_LEVEL_LOG:
|
| + level = "CONSOLE_MESSAGE_LEVEL_LOG";
|
| + break;
|
| + case content::CONSOLE_MESSAGE_LEVEL_WARNING:
|
| + level = "CONSOLE_MESSAGE_LEVEL_WARNING";
|
| + break;
|
| + case content::CONSOLE_MESSAGE_LEVEL_ERROR:
|
| + level = "CONSOLE_MESSAGE_LEVEL_ERROR";
|
| + break;
|
| + }
|
| + LogParam(level, l);
|
| +}
|
| +
|
| } // namespace IPC
|
|
|