OLD | NEW |
(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 class UkmSource { |
| 19 public: |
| 20 UkmSource(); |
| 21 ~UkmSource(); |
| 22 |
| 23 void set_committed_url(const GURL& committed_url) { |
| 24 committed_url_ = committed_url; |
| 25 } |
| 26 void set_navigation_start(const base::TimeTicks& navigation_start) { |
| 27 navigation_start_ = navigation_start; |
| 28 } |
| 29 void set_first_meaningful_paint( |
| 30 const base::TimeDelta& first_meaningful_paint) { |
| 31 first_meaningful_paint_ = first_meaningful_paint; |
| 32 } |
| 33 |
| 34 void PopulateProto(Source* proto_source); |
| 35 |
| 36 private: |
| 37 GURL committed_url_; |
| 38 base::TimeTicks navigation_start_; |
| 39 base::TimeDelta first_meaningful_paint_; |
| 40 }; |
| 41 |
| 42 } // namespace ukm |
| 43 |
| 44 #endif // COMPONENTS_UKM_UKM_SOURCE_H_ |
OLD | NEW |