• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
7 namespace IPC {
8 
Write(Message * m,const ContentSettings & settings)9 void 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 
Read(const Message * m,void ** iter,ContentSettings * r)15 bool 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 
Log(const ContentSettings & p,std::string * l)24 void ParamTraits<ContentSettings>::Log(
25     const ContentSettings& p, std::string* l) {
26   l->append("<ContentSettings>");
27 }
28 
29 }  // namespace IPC
30