Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: components/ukm/ukm_source.cc

Issue 2649303004: UKM: Added support for navigation sources (Closed)
Patch Set: Removed redundant test steps Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« components/ukm/ukm_source.h ('K') | « components/ukm/ukm_source.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/ukm/ukm_source.h"
6 #include "components/metrics/proto/ukm/source.pb.h"
7
8 namespace ukm {
9
10 UkmSource::UkmSource() = default;
11
12 UkmSource::~UkmSource() = default;
13
14 void UkmSource::PopulateProto(Source* proto_source) {
15 proto_source->set_url(committed_url_.spec());
16
17 base::TimeDelta navigation_start_in_msec =
18 navigation_start_ - base::Time::UnixEpoch();
19 proto_source->set_navigation_time_msec(
20 navigation_start_in_msec.InMilliseconds());
21
22 proto_source->set_first_contentful_paint_msec(
23 first_contentful_paint_.InMilliseconds());
24 }
25
26 } // namespace ukm
OLDNEW
« components/ukm/ukm_source.h ('K') | « components/ukm/ukm_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698