summaryrefslogtreecommitdiff
path: root/chromium/components/optimization_guide/optimization_metadata.cc
blob: c58881135155c8b7fc18d46b96c6762e62f36cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2020 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.

#include "components/optimization_guide/optimization_metadata.h"

namespace optimization_guide {

OptimizationMetadata::OptimizationMetadata() = default;
OptimizationMetadata::~OptimizationMetadata() = default;
OptimizationMetadata::OptimizationMetadata(const OptimizationMetadata&) =
    default;

void OptimizationMetadata::SetAnyMetadataForTesting(
    const google::protobuf::MessageLite& metadata) {
  proto::Any any;
  any.set_type_url(metadata.GetTypeName());
  metadata.SerializeToString(any.mutable_value());
  any_metadata_ = any;
}

}  // namespace optimization_guide