OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/render_messages.h" | 5 #include "chrome/common/render_messages.h" |
6 | 6 |
7 #include "chrome/common/content_settings_pattern_serializer.h" | 7 #include "chrome/common/content_settings_pattern_serializer.h" |
8 | 8 |
9 namespace IPC { | 9 namespace IPC { |
10 | 10 |
| 11 void ParamTraits<ContentSettingsPattern>::GetSize( |
| 12 base::PickleSizer* s, |
| 13 const ContentSettingsPattern& pattern) { |
| 14 ContentSettingsPatternSerializer::GetSize(pattern, s); |
| 15 } |
| 16 |
11 void ParamTraits<ContentSettingsPattern>::Write( | 17 void ParamTraits<ContentSettingsPattern>::Write( |
12 base::Pickle* m, | 18 base::Pickle* m, |
13 const ContentSettingsPattern& pattern) { | 19 const ContentSettingsPattern& pattern) { |
14 ContentSettingsPatternSerializer::WriteToMessage(pattern, m); | 20 ContentSettingsPatternSerializer::WriteToMessage(pattern, m); |
15 } | 21 } |
16 | 22 |
17 bool ParamTraits<ContentSettingsPattern>::Read( | 23 bool ParamTraits<ContentSettingsPattern>::Read( |
18 const base::Pickle* m, | 24 const base::Pickle* m, |
19 base::PickleIterator* iter, | 25 base::PickleIterator* iter, |
20 ContentSettingsPattern* pattern) { | 26 ContentSettingsPattern* pattern) { |
21 return ContentSettingsPatternSerializer::ReadFromMessage(m, iter, pattern); | 27 return ContentSettingsPatternSerializer::ReadFromMessage(m, iter, pattern); |
22 } | 28 } |
23 | 29 |
24 void ParamTraits<ContentSettingsPattern>::Log( | 30 void ParamTraits<ContentSettingsPattern>::Log( |
25 const ContentSettingsPattern& p, std::string* l) { | 31 const ContentSettingsPattern& p, std::string* l) { |
26 l->append("<ContentSettingsPattern: "); | 32 l->append("<ContentSettingsPattern: "); |
27 l->append(p.ToString()); | 33 l->append(p.ToString()); |
28 l->append(">"); | 34 l->append(">"); |
29 } | 35 } |
30 | 36 |
31 } // namespace IPC | 37 } // namespace IPC |
OLD | NEW |