render_messages.cc revision ddb351dbec246cf1fab5ec20d2d5520909041de1
1// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chrome/common/render_messages.h"
6
7namespace IPC {
8
9void ParamTraits<ContentSettings>::Write(
10    Message* m, const ContentSettings& settings) {
11  for (size_t i = 0; i < arraysize(settings.settings); ++i)
12    WriteParam(m, settings.settings[i]);
13}
14
15bool ParamTraits<ContentSettings>::Read(
16    const Message* m, void** iter, ContentSettings* r) {
17  for (size_t i = 0; i < arraysize(r->settings); ++i) {
18    if (!ReadParam(m, iter, &r->settings[i]))
19      return false;
20  }
21  return true;
22}
23
24void ParamTraits<ContentSettings>::Log(
25    const ContentSettings& p, std::string* l) {
26  l->append("<ContentSettings>");
27}
28
29}  // namespace IPC
30