Chromium Code Reviews| Index: content/common/network_traffic_annotation_param_traits.h |
| diff --git a/content/common/network_traffic_annotation_param_traits.h b/content/common/network_traffic_annotation_param_traits.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..292af0248ea83ac80f2fca09a4f17022c8abd0df |
| --- /dev/null |
| +++ b/content/common/network_traffic_annotation_param_traits.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright (c) 2012 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. |
| +// |
| +// IPC Messages sent between compositor instances. |
| + |
| +#ifndef CONTENT_COMMON_NETWORK_TRAFFIC_ANNOTATION_PARAM_TRAITS_H_ |
| +#define CONTENT_COMMON_NETWORK_TRAFFIC_ANNOTATION_PARAM_TRAITS_H_ |
| + |
| +#include "cc/base/filter_operation.h" |
| +#include "cc/ipc/cc_ipc_export.h" |
| +#include "cc/ipc/cc_param_traits_macros.h" |
| +#include "cc/output/compositor_frame.h" |
| +#include "ipc/ipc_message_macros.h" |
| +#include "net/traffic_annotation/network_traffic_annotation.h" |
| + |
| +namespace IPC { |
| + |
| +template <> |
| +struct CC_IPC_EXPORT ParamTraits<net::MutableNetworkTrafficAnnotationTag> { |
|
yzshen1
2017/06/02 15:06:18
Have you considered defining a mojom type and then
Ramin Halavati
2017/06/02 16:46:03
Acknowledged.
|
| + typedef net::MutableNetworkTrafficAnnotationTag 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* p); |
| + static void Log(const param_type& p, std::string* l); |
| +}; |
| + |
| +template <> |
| +struct CC_IPC_EXPORT |
| + ParamTraits<net::MutablePartialNetworkTrafficAnnotationTag> { |
|
yzshen1
2017/06/02 15:06:18
Is this going to be used in future CLs?
I notice n
Ramin Halavati
2017/06/02 16:46:03
It is not used now, and I am not sure when we woul
|
| + typedef net::MutablePartialNetworkTrafficAnnotationTag 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* p); |
| + static void Log(const param_type& p, std::string* l); |
| +}; |
| + |
| +} // namespace IPC |
| + |
| +#endif // CONTENT_COMMON_NETWORK_TRAFFIC_ANNOTATION_PARAM_TRAITS_H_ |