Chromium Code Reviews| Index: components/network_hints/common/network_hints_param_traits.h |
| diff --git a/components/network_hints/common/network_hints_param_traits.h b/components/network_hints/common/network_hints_param_traits.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c39ffbe3a620be9df6f5ab920050b5109a90e2fd |
| --- /dev/null |
| +++ b/components/network_hints/common/network_hints_param_traits.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Multiply-included file, no traditional include guard. |
|
Julia Tuttle
2016/07/18 14:39:29
Why? Unless I'm misreading, there are no declarati
tibell
2016/07/19 01:55:36
Done.
|
| +#include <string> |
| +#include <vector> |
| + |
| +#include "components/network_hints/common/network_hints_common.h" |
| +#include "ipc/ipc_message_macros.h" |
| +#include "ipc/ipc_message_utils.h" |
| +#include "url/ipc/url_param_traits.h" |
| + |
| +// Singly-included section for custom IPC traits. |
| +#ifndef COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_PARAM_TRAITS_H_ |
| +#define COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_PARAM_TRAITS_H_ |
| + |
| +namespace IPC { |
| + |
| +template <> |
| +struct ParamTraits<network_hints::LookupRequest> { |
| + typedef network_hints::LookupRequest param_type; |
| + static void GetSize(base::PickleSizer* s, const param_type& p); |
| + static void Write(base::Pickle* m, const param_type& p); |
| + static bool Read(const base::Pickle* m, |
| + base::PickleIterator* iter, |
| + param_type* r); |
| + static void Log(const param_type& p, std::string* l); |
| +}; |
| + |
| +} // namespace IPC |
| + |
| +#endif // COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_PARAM_TRAITS_H_ |