OLD | NEW |
(Empty) | |
| 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 #ifndef CHROME_COMMON_COMMON_PARAM_TRAITS_H_ |
| 6 #define CHROME_COMMON_COMMON_PARAM_TRAITS_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 |
| 11 #include "chrome/common/content_settings.h" |
| 12 #include "ipc/ipc_param_traits.h" |
| 13 |
| 14 namespace IPC { |
| 15 |
| 16 class Message; |
| 17 |
| 18 template <> |
| 19 struct ParamTraits<ContentSetting> { |
| 20 typedef ContentSetting param_type; |
| 21 static void Write(Message* m, const param_type& p); |
| 22 static bool Read(const Message* m, void** iter, param_type* p); |
| 23 static void Log(const param_type& p, std::string* l); |
| 24 }; |
| 25 |
| 26 template <> |
| 27 struct ParamTraits<ContentSettingsType> { |
| 28 typedef ContentSettingsType param_type; |
| 29 static void Write(Message* m, const param_type& p); |
| 30 static bool Read(const Message* m, void** iter, param_type* p); |
| 31 static void Log(const param_type& p, std::string* l); |
| 32 }; |
| 33 |
| 34 } // namespace IPC |
| 35 |
| 36 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_ |
OLD | NEW |