Index: components/ukm/ukm_source.h |
diff --git a/components/ukm/ukm_source.h b/components/ukm/ukm_source.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9c3c342ed922e51f05721388331c9a639d9141b0 |
--- /dev/null |
+++ b/components/ukm/ukm_source.h |
@@ -0,0 +1,44 @@ |
+// 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. |
+ |
+#ifndef COMPONENTS_UKM_UKM_SOURCE_H_ |
+#define COMPONENTS_UKM_UKM_SOURCE_H_ |
+ |
+#include <stddef.h> |
+ |
+#include "base/macros.h" |
+#include "base/time/time.h" |
+#include "url/gurl.h" |
+ |
+namespace ukm { |
+ |
+class Source; |
+ |
+class UkmSource { |
+ public: |
+ UkmSource(); |
+ ~UkmSource(); |
+ |
+ void set_committed_url(const GURL& committed_url) { |
+ committed_url_ = committed_url; |
+ } |
+ void set_navigation_start(const base::TimeTicks& navigation_start) { |
+ navigation_start_ = navigation_start; |
+ } |
+ void set_first_meaningful_paint( |
+ const base::TimeDelta& first_meaningful_paint) { |
+ first_meaningful_paint_ = first_meaningful_paint; |
+ } |
+ |
+ void PopulateProto(Source* proto_source); |
+ |
+ private: |
+ GURL committed_url_; |
+ base::TimeTicks navigation_start_; |
+ base::TimeDelta first_meaningful_paint_; |
+}; |
+ |
+} // namespace ukm |
+ |
+#endif // COMPONENTS_UKM_UKM_SOURCE_H_ |