| Index: content/public/common/common_param_traits.cc
|
| ===================================================================
|
| --- content/public/common/common_param_traits.cc (revision 143049)
|
| +++ content/public/common/common_param_traits.cc (working copy)
|
| @@ -553,39 +553,22 @@
|
| l->append("<SkBitmap>");
|
| }
|
|
|
| -void ParamTraits<content::ConsoleMessageLevel>::Write(Message* m,
|
| - const param_type& p) {
|
| - m->WriteInt(static_cast<int>(p));
|
| -}
|
| +} // namespace IPC
|
|
|
| -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;
|
| -}
|
| +// Generate param traits write methods.
|
| +#include "ipc/param_traits_write_macros.h"
|
| +namespace IPC {
|
| +#include "content/public/common/common_param_traits_defs.h"
|
| +} // namespace IPC
|
|
|
| -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);
|
| -}
|
| +// Generate param traits read methods.
|
| +#include "ipc/param_traits_read_macros.h"
|
| +namespace IPC {
|
| +#include "content/public/common/common_param_traits_defs.h"
|
| +} // namespace IPC
|
|
|
| +// Generate param traits log methods.
|
| +#include "ipc/param_traits_log_macros.h"
|
| +namespace IPC {
|
| +#include "content/public/common/common_param_traits_defs.h"
|
| } // namespace IPC
|
|
|