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

Unified Diff: components/ukm/ukm_source.h

Issue 2617883004: Initial UKMPageLoadMetricsObserver (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698