| Index: components/ukm/ukm_source.cc
|
| diff --git a/components/ukm/ukm_source.cc b/components/ukm/ukm_source.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..486fdece7055b0dc462c7d0d2110ac48bb313922
|
| --- /dev/null
|
| +++ b/components/ukm/ukm_source.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2017 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/ukm/ukm_source.h"
|
| +#include "components/metrics/proto/ukm/source.pb.h"
|
| +
|
| +namespace ukm {
|
| +
|
| +UkmSource::UkmSource() {}
|
| +
|
| +UkmSource::~UkmSource() {}
|
| +
|
| +void UkmSource::PopulateProto(Source* proto_source) {
|
| + proto_source->set_url(committed_url_.path());
|
| +
|
| + base::TimeDelta navigation_start_since_epoch =
|
| + navigation_start_ - base::TimeTicks::UnixEpoch();
|
| + proto_source->set_navigation_time_msec(
|
| + navigation_start_since_epoch.InMilliseconds());
|
| +
|
| + proto_source->set_first_meaningful_paint_msec(
|
| + first_meaningful_paint_.InMilliseconds());
|
| +}
|
| +
|
| +} // namespace ukm
|
|
|