• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /*******************************************************************************
18  * AUTOGENERATED - DO NOT EDIT
19  *******************************************************************************
20  * This file has been generated from the protobuf message
21  * perfetto/config/chrome/chrome_config.proto
22  * by
23  * ../../tools/proto_to_cpp/proto_to_cpp.cc.
24  * If you need to make changes here, change the .proto file and then run
25  * ./tools/gen_tracing_cpp_headers_from_protos.py
26  */
27 
28 #include "perfetto/tracing/core/chrome_config.h"
29 
30 #include "perfetto/config/chrome/chrome_config.pb.h"
31 
32 namespace perfetto {
33 
34 ChromeConfig::ChromeConfig() = default;
35 ChromeConfig::~ChromeConfig() = default;
36 ChromeConfig::ChromeConfig(const ChromeConfig&) = default;
37 ChromeConfig& ChromeConfig::operator=(const ChromeConfig&) = default;
38 ChromeConfig::ChromeConfig(ChromeConfig&&) noexcept = default;
39 ChromeConfig& ChromeConfig::operator=(ChromeConfig&&) = default;
40 
41 void ChromeConfig::FromProto(const perfetto::protos::ChromeConfig& proto) {
42   static_assert(sizeof(trace_config_) == sizeof(proto.trace_config()),
43                 "size mismatch");
44   trace_config_ = static_cast<decltype(trace_config_)>(proto.trace_config());
45   unknown_fields_ = proto.unknown_fields();
46 }
47 
48 void ChromeConfig::ToProto(perfetto::protos::ChromeConfig* proto) const {
49   proto->Clear();
50 
51   static_assert(sizeof(trace_config_) == sizeof(proto->trace_config()),
52                 "size mismatch");
53   proto->set_trace_config(
54       static_cast<decltype(proto->trace_config())>(trace_config_));
55   *(proto->mutable_unknown_fields()) = unknown_fields_;
56 }
57 
58 }  // namespace perfetto
59