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

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

Issue 2649303004: UKM: Added support for navigation sources (Closed)
Patch Set: Created 3 years, 10 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
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 #ifndef COMPONENTS_UKM_UKM_SOURCE_H_
6 #define COMPONENTS_UKM_UKM_SOURCE_H_
7
8 #include <stddef.h>
9
10 #include "base/macros.h"
11 #include "base/time/time.h"
12 #include "url/gurl.h"
13
14 namespace ukm {
15
16 class Source;
17
18 // Contains UKM data for a single navigation entry.
19 class UkmSource {
20 public:
21 UkmSource();
22 ~UkmSource();
23
24 const GURL& committed_url() const { return committed_url_; }
25 void set_committed_url(const GURL& committed_url) {
26 committed_url_ = committed_url;
27 }
28
29 base::Time navigation_start() const { return navigation_start_; }
30 void set_navigation_start(const base::Time& navigation_start) {
31 navigation_start_ = navigation_start;
32 }
33
34 base::TimeDelta first_contentful_paint() const {
35 return first_contentful_paint_;
36 }
37 void set_first_contentful_paint(
38 const base::TimeDelta& first_contentful_paint) {
39 first_contentful_paint_ = first_contentful_paint;
40 }
41
42 // Serializes the members of the class into the supplied proto.
43 void PopulateProto(Source* proto_source);
44
45 private:
46 GURL committed_url_;
47 base::Time navigation_start_;
48 base::TimeDelta first_contentful_paint_;
49 };
50
51 } // namespace ukm
52
53 #endif // COMPONENTS_UKM_UKM_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698